View Source GoogleApi.IAM.V2.Api.Policies (google_api_iam v0.42.0)

API calls for all endpoints tagged Policies.

Summary

Functions

Retrieves the policies of the specified kind that are attached to a resource. The response lists only policy metadata. In particular, policy rules are omitted.

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Updates the specified policy. You can update only the rules and the display name for the policy. To update a policy, you should use a read-modify-write loop: 1. Use GetPolicy to read the current version of the policy. 2. Modify the policy as needed. 3. Use UpdatePolicy to write the updated policy. This pattern helps prevent conflicts between concurrent updates.

Functions

Link to this function

iam_policies_create_policy(connection, policies_id, policies_id1, optional_params \\ [], opts \\ [])

View Source
@spec iam_policies_create_policy(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.IAM.V2.Model.GoogleLongrunningOperation.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Creates a policy.

Parameters

  • connection (type: GoogleApi.IAM.V2.Connection.t) - Connection to server
  • policies_id (type: String.t) - Part of parent. Required. The resource that the policy is attached to, along with the kind of policy to create. Format: policies/{attachment_point}/denypolicies The attachment point is identified by its URL-encoded full resource name, which means that the forward-slash character, /, must be written as %2F. For example, policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies. For organizations and folders, use the numeric ID in the full resource name. For projects, you can use the alphanumeric or the numeric ID.
  • policies_id1 (type: String.t) - Part of parent. See documentation of policiesId.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :policyId (type: String.t) - The ID to use for this policy, which will become the final component of the policy's resource name. The ID must contain 3 to 63 characters. It can contain lowercase letters and numbers, as well as dashes (-) and periods (.). The first character must be a lowercase letter.
    • :body (type: GoogleApi.IAM.V2.Model.GoogleIamV2Policy.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.IAM.V2.Model.GoogleLongrunningOperation{}} on success
  • {:error, info} on failure
Link to this function

iam_policies_delete(connection, policies_id, policies_id1, policies_id2, optional_params \\ [], opts \\ [])

View Source
@spec iam_policies_delete(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.IAM.V2.Model.GoogleLongrunningOperation.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Deletes a policy. This action is permanent.

Parameters

  • connection (type: GoogleApi.IAM.V2.Connection.t) - Connection to server
  • policies_id (type: String.t) - Part of name. Required. The resource name of the policy to delete. Format: policies/{attachment_point}/denypolicies/{policy_id} Use the URL-encoded full resource name, which means that the forward-slash character, /, must be written as %2F. For example, policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy. For organizations and folders, use the numeric ID in the full resource name. For projects, you can use the alphanumeric or the numeric ID.
  • policies_id1 (type: String.t) - Part of name. See documentation of policiesId.
  • policies_id2 (type: String.t) - Part of name. See documentation of policiesId.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :etag (type: String.t) - Optional. The expected etag of the policy to delete. If the value does not match the value that is stored in IAM, the request fails with a 409 error code and ABORTED status. If you omit this field, the policy is deleted regardless of its current etag.
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.IAM.V2.Model.GoogleLongrunningOperation{}} on success
  • {:error, info} on failure
Link to this function

iam_policies_get(connection, policies_id, policies_id1, policies_id2, optional_params \\ [], opts \\ [])

View Source
@spec iam_policies_get(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.IAM.V2.Model.GoogleIamV2Policy.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Gets a policy.

Parameters

  • connection (type: GoogleApi.IAM.V2.Connection.t) - Connection to server
  • policies_id (type: String.t) - Part of name. Required. The resource name of the policy to retrieve. Format: policies/{attachment_point}/denypolicies/{policy_id} Use the URL-encoded full resource name, which means that the forward-slash character, /, must be written as %2F. For example, policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy. For organizations and folders, use the numeric ID in the full resource name. For projects, you can use the alphanumeric or the numeric ID.
  • policies_id1 (type: String.t) - Part of name. See documentation of policiesId.
  • policies_id2 (type: String.t) - Part of name. See documentation of policiesId.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.IAM.V2.Model.GoogleIamV2Policy{}} on success
  • {:error, info} on failure
Link to this function

iam_policies_list_policies(connection, policies_id, policies_id1, optional_params \\ [], opts \\ [])

View Source
@spec iam_policies_list_policies(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.IAM.V2.Model.GoogleIamV2ListPoliciesResponse.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Retrieves the policies of the specified kind that are attached to a resource. The response lists only policy metadata. In particular, policy rules are omitted.

Parameters

  • connection (type: GoogleApi.IAM.V2.Connection.t) - Connection to server
  • policies_id (type: String.t) - Part of parent. Required. The resource that the policy is attached to, along with the kind of policy to list. Format: policies/{attachment_point}/denypolicies The attachment point is identified by its URL-encoded full resource name, which means that the forward-slash character, /, must be written as %2F. For example, policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies. For organizations and folders, use the numeric ID in the full resource name. For projects, you can use the alphanumeric or the numeric ID.
  • policies_id1 (type: String.t) - Part of parent. See documentation of policiesId.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :pageSize (type: integer()) - The maximum number of policies to return. IAM ignores this value and uses the value 1000.
    • :pageToken (type: String.t) - A page token received in a ListPoliciesResponse. Provide this token to retrieve the next page.
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.IAM.V2.Model.GoogleIamV2ListPoliciesResponse{}} on success
  • {:error, info} on failure
Link to this function

iam_policies_operations_get(connection, policies_id, policies_id1, policies_id2, operations_id, optional_params \\ [], opts \\ [])

View Source
@spec iam_policies_operations_get(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.IAM.V2.Model.GoogleLongrunningOperation.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters

  • connection (type: GoogleApi.IAM.V2.Connection.t) - Connection to server
  • policies_id (type: String.t) - Part of name. The name of the operation resource.
  • policies_id1 (type: String.t) - Part of name. See documentation of policiesId.
  • policies_id2 (type: String.t) - Part of name. See documentation of policiesId.
  • operations_id (type: String.t) - Part of name. See documentation of policiesId.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.IAM.V2.Model.GoogleLongrunningOperation{}} on success
  • {:error, info} on failure
Link to this function

iam_policies_update(connection, policies_id, policies_id1, policies_id2, optional_params \\ [], opts \\ [])

View Source
@spec iam_policies_update(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.IAM.V2.Model.GoogleLongrunningOperation.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Updates the specified policy. You can update only the rules and the display name for the policy. To update a policy, you should use a read-modify-write loop: 1. Use GetPolicy to read the current version of the policy. 2. Modify the policy as needed. 3. Use UpdatePolicy to write the updated policy. This pattern helps prevent conflicts between concurrent updates.

Parameters

  • connection (type: GoogleApi.IAM.V2.Connection.t) - Connection to server
  • policies_id (type: String.t) - Part of policy.name. Immutable. The resource name of the Policy, which must be unique. Format: policies/{attachment_point}/denypolicies/{policy_id} The attachment point is identified by its URL-encoded full resource name, which means that the forward-slash character, /, must be written as %2F. For example, policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy. For organizations and folders, use the numeric ID in the full resource name. For projects, requests can use the alphanumeric or the numeric ID. Responses always contain the numeric ID.
  • policies_id1 (type: String.t) - Part of policy.name. See documentation of policiesId.
  • policies_id2 (type: String.t) - Part of policy.name. See documentation of policiesId.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :body (type: GoogleApi.IAM.V2.Model.GoogleIamV2Policy.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.IAM.V2.Model.GoogleLongrunningOperation{}} on success
  • {:error, info} on failure