GoogleApi.OrgPolicy.V2.Api.Folders (google_api_org_policy v0.9.1)

View Source

API calls for all endpoints tagged Folders.

Summary

Functions

Lists constraints that could be applied on the specified resource.

Creates a policy. Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint does not exist. Returns a google.rpc.Status with google.rpc.Code.ALREADY_EXISTS if the policy already exists on the given Google Cloud resource.

Deletes a policy. Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint or organization policy does not exist.

Gets a policy on a resource. If no policy is set on the resource, NOT_FOUND is returned. The etag value can be used with UpdatePolicy() to update a policy during read-modify-write.

Gets the effective policy on a resource. This is the result of merging policies in the resource hierarchy and evaluating conditions. The returned policy will not have an etag or condition set because it is an evaluated policy across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.

Retrieves all of the policies that exist on a particular resource.

Updates a policy. Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint or the policy do not exist. Returns a google.rpc.Status with google.rpc.Code.ABORTED if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields.

Functions

orgpolicy_folders_constraints_list(connection, parent, optional_params \\ [], opts \\ [])

@spec orgpolicy_folders_constraints_list(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok,
   GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ListConstraintsResponse.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Lists constraints that could be applied on the specified resource.

Parameters

  • connection (type: GoogleApi.OrgPolicy.V2.Connection.t) - Connection to server
  • parent (type: String.t) - Required. The Google Cloud resource that parents the constraint. Must be in one of the following forms: projects/{project_number} projects/{project_id} folders/{folder_id} organizations/{organization_id}
  • 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()) - Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size.
    • :pageToken (type: String.t) - Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field.
  • opts (type: keyword()) - Call options

Returns

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

orgpolicy_folders_policies_create(connection, parent, optional_params \\ [], opts \\ [])

@spec orgpolicy_folders_policies_create(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2Policy.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Creates a policy. Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint does not exist. Returns a google.rpc.Status with google.rpc.Code.ALREADY_EXISTS if the policy already exists on the given Google Cloud resource.

Parameters

  • connection (type: GoogleApi.OrgPolicy.V2.Connection.t) - Connection to server
  • parent (type: String.t) - Required. The Google Cloud resource that will parent the new policy. Must be in one of the following forms: projects/{project_number} projects/{project_id} folders/{folder_id} organizations/{organization_id}
  • 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.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2Policy.t) -
  • opts (type: keyword()) - Call options

Returns

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

orgpolicy_folders_policies_delete(connection, name, optional_params \\ [], opts \\ [])

@spec orgpolicy_folders_policies_delete(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.OrgPolicy.V2.Model.GoogleProtobufEmpty.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Deletes a policy. Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint or organization policy does not exist.

Parameters

  • connection (type: GoogleApi.OrgPolicy.V2.Connection.t) - Connection to server
  • name (type: String.t) - Required. Name of the policy to delete. See the policy entry for naming rules.
  • 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 current etag of policy. If an etag is provided and does not match the current etag of the policy, deletion will be blocked and an ABORTED error will be returned.
  • opts (type: keyword()) - Call options

Returns

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

orgpolicy_folders_policies_get(connection, name, optional_params \\ [], opts \\ [])

@spec orgpolicy_folders_policies_get(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2Policy.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Gets a policy on a resource. If no policy is set on the resource, NOT_FOUND is returned. The etag value can be used with UpdatePolicy() to update a policy during read-modify-write.

Parameters

  • connection (type: GoogleApi.OrgPolicy.V2.Connection.t) - Connection to server
  • name (type: String.t) - Required. Resource name of the policy. See Policy for naming requirements.
  • 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.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2Policy{}} on success
  • {:error, info} on failure

orgpolicy_folders_policies_get_effective_policy(connection, name, optional_params \\ [], opts \\ [])

@spec orgpolicy_folders_policies_get_effective_policy(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2Policy.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Gets the effective policy on a resource. This is the result of merging policies in the resource hierarchy and evaluating conditions. The returned policy will not have an etag or condition set because it is an evaluated policy across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.

Parameters

  • connection (type: GoogleApi.OrgPolicy.V2.Connection.t) - Connection to server
  • name (type: String.t) - Required. The effective policy to compute. See Policy for naming requirements.
  • 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.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2Policy{}} on success
  • {:error, info} on failure

orgpolicy_folders_policies_list(connection, parent, optional_params \\ [], opts \\ [])

@spec orgpolicy_folders_policies_list(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok,
   GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2ListPoliciesResponse.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Retrieves all of the policies that exist on a particular resource.

Parameters

  • connection (type: GoogleApi.OrgPolicy.V2.Connection.t) - Connection to server
  • parent (type: String.t) - Required. The target Google Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: projects/{project_number} projects/{project_id} folders/{folder_id} organizations/{organization_id}
  • 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()) - Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size.
    • :pageToken (type: String.t) - Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field.
  • opts (type: keyword()) - Call options

Returns

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

orgpolicy_folders_policies_patch(connection, name, optional_params \\ [], opts \\ [])

@spec orgpolicy_folders_policies_patch(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2Policy.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Updates a policy. Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint or the policy do not exist. Returns a google.rpc.Status with google.rpc.Code.ABORTED if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields.

Parameters

  • connection (type: GoogleApi.OrgPolicy.V2.Connection.t) - Connection to server
  • name (type: String.t) - Immutable. The resource name of the policy. Must be one of the following forms, where constraint_name is the name of the constraint which this policy configures: projects/{project_number}/policies/{constraint_name} folders/{folder_id}/policies/{constraint_name} * organizations/{organization_id}/policies/{constraint_name} For example, projects/123/policies/compute.disableSerialPortAccess. Note: projects/{project_id}/policies/{constraint_name} is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
  • 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").
    • :updateMask (type: String.t) - Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request.
    • :body (type: GoogleApi.OrgPolicy.V2.Model.GoogleCloudOrgpolicyV2Policy.t) -
  • opts (type: keyword()) - Call options

Returns

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