GoogleApi.OrgPolicy.V2.Api.Projects (google_api_org_policy v0.2.0) View Source

API calls for all endpoints tagged Projects.

Link to this section 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 Cloud resource.

Deletes a Policy. Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint or Org 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 a computed 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.

Link to this section Functions

Link to this function

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

View Source

Specs

orgpolicy_projects_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 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
Link to this function

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

View Source

Specs

orgpolicy_projects_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 Cloud resource.

Parameters

  • connection (type: GoogleApi.OrgPolicy.V2.Connection.t) - Connection to server
  • parent (type: String.t) - Required. The 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
Link to this function

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

View Source

Specs

orgpolicy_projects_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 Org 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 Policy 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").
  • opts (type: keyword()) - Call options

Returns

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

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

View Source

Specs

orgpolicy_projects_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
Link to this function

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

View Source

Specs

orgpolicy_projects_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 a computed 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 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").
  • opts (type: keyword()) - Call options

Returns

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

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

View Source

Specs

orgpolicy_projects_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 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
Link to this function

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

View Source

Specs

orgpolicy_projects_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").
    • :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