diff --git a/clients/secret_manager/lib/google_api/secret_manager/v1/api/projects.ex b/clients/secret_manager/lib/google_api/secret_manager/v1/api/projects.ex index e800423ccd..3464876f86 100644 --- a/clients/secret_manager/lib/google_api/secret_manager/v1/api/projects.ex +++ b/clients/secret_manager/lib/google_api/secret_manager/v1/api/projects.ex @@ -183,7 +183,1261 @@ defmodule GoogleApi.SecretManager.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*`. + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `secrets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `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.SecretManager.V1.Model.AddSecretVersionRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecretManager.V1.Model.SecretVersion{}}` on success + * `{:error, info}` on failure + """ + @spec secretmanager_projects_locations_secrets_add_version( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecretManager.V1.Model.SecretVersion.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def secretmanager_projects_locations_secrets_add_version( + connection, + projects_id, + locations_id, + secrets_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:addVersion", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "secretsId" => URI.encode(secrets_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecretManager.V1.Model.SecretVersion{}]) + end + + @doc """ + Creates a new Secret containing no SecretVersions. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name of the project to associate with the Secret, in the format `projects/*` or `projects/*/locations/*`. + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `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"). + * `:secretId` (*type:* `String.t`) - Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters. + * `:body` (*type:* `GoogleApi.SecretManager.V1.Model.Secret.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecretManager.V1.Model.Secret{}}` on success + * `{:error, info}` on failure + """ + @spec secretmanager_projects_locations_secrets_create( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecretManager.V1.Model.Secret.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def secretmanager_projects_locations_secrets_create( + connection, + projects_id, + locations_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :secretId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/projects/{projectsId}/locations/{locationsId}/secrets", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecretManager.V1.Model.Secret{}]) + end + + @doc """ + Deletes a Secret. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the Secret to delete in the format `projects/*/secrets/*`. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `secrets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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. Etag of the Secret. The request succeeds if it matches the etag of the currently stored secret object. If the etag is omitted, the request succeeds. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecretManager.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec secretmanager_projects_locations_secrets_delete( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecretManager.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def secretmanager_projects_locations_secrets_delete( + connection, + projects_id, + locations_id, + secrets_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :etag => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "secretsId" => URI.encode(secrets_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecretManager.V1.Model.Empty{}]) + end + + @doc """ + Gets metadata for a given Secret. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the Secret, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `secrets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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.SecretManager.V1.Model.Secret{}}` on success + * `{:error, info}` on failure + """ + @spec secretmanager_projects_locations_secrets_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecretManager.V1.Model.Secret.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def secretmanager_projects_locations_secrets_get( + connection, + projects_id, + locations_id, + secrets_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "secretsId" => URI.encode(secrets_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecretManager.V1.Model.Secret{}]) + end + + @doc """ + Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `resource`. REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `locations_id` (*type:* `String.t`) - Part of `resource`. See documentation of `projectsId`. + * `secrets_id` (*type:* `String.t`) - Part of `resource`. See documentation of `projectsId`. + * `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"). + * `:"options.requestedPolicyVersion"` (*type:* `integer()`) - Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecretManager.V1.Model.Policy{}}` on success + * `{:error, info}` on failure + """ + @spec secretmanager_projects_locations_secrets_get_iam_policy( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecretManager.V1.Model.Policy.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def secretmanager_projects_locations_secrets_get_iam_policy( + connection, + projects_id, + locations_id, + secrets_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :"options.requestedPolicyVersion" => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:getIamPolicy", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "secretsId" => URI.encode(secrets_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecretManager.V1.Model.Policy{}]) + end + + @doc """ + Lists Secrets. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name of the project associated with the Secrets, in the format `projects/*` or `projects/*/locations/*` + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `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"). + * `:filter` (*type:* `String.t`) - Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secrets matching the filter. If filter is empty, all secrets are listed. + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000. + * `:pageToken` (*type:* `String.t`) - Optional. Pagination token, returned earlier via ListSecretsResponse.next_page_token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecretManager.V1.Model.ListSecretsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec secretmanager_projects_locations_secrets_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecretManager.V1.Model.ListSecretsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def secretmanager_projects_locations_secrets_list( + connection, + projects_id, + locations_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/projects/{projectsId}/locations/{locationsId}/secrets", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecretManager.V1.Model.ListSecretsResponse{}]) + end + + @doc """ + Updates metadata of an existing Secret. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `secret.name`. Output only. The resource name of the Secret in the format `projects/*/secrets/*`. + * `locations_id` (*type:* `String.t`) - Part of `secret.name`. See documentation of `projectsId`. + * `secrets_id` (*type:* `String.t`) - Part of `secret.name`. See documentation of `projectsId`. + * `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`) - Required. Specifies the fields to be updated. + * `:body` (*type:* `GoogleApi.SecretManager.V1.Model.Secret.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecretManager.V1.Model.Secret{}}` on success + * `{:error, info}` on failure + """ + @spec secretmanager_projects_locations_secrets_patch( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecretManager.V1.Model.Secret.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def secretmanager_projects_locations_secrets_patch( + connection, + projects_id, + locations_id, + secrets_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "secretsId" => URI.encode(secrets_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecretManager.V1.Model.Secret{}]) + end + + @doc """ + Sets the access control policy on the specified secret. Replaces any existing policy. Permissions on SecretVersions are enforced according to the policy set on the associated Secret. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `resource`. REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `locations_id` (*type:* `String.t`) - Part of `resource`. See documentation of `projectsId`. + * `secrets_id` (*type:* `String.t`) - Part of `resource`. See documentation of `projectsId`. + * `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.SecretManager.V1.Model.SetIamPolicyRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecretManager.V1.Model.Policy{}}` on success + * `{:error, info}` on failure + """ + @spec secretmanager_projects_locations_secrets_set_iam_policy( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecretManager.V1.Model.Policy.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def secretmanager_projects_locations_secrets_set_iam_policy( + connection, + projects_id, + locations_id, + secrets_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:setIamPolicy", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "secretsId" => URI.encode(secrets_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecretManager.V1.Model.Policy{}]) + end + + @doc """ + Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `resource`. REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `locations_id` (*type:* `String.t`) - Part of `resource`. See documentation of `projectsId`. + * `secrets_id` (*type:* `String.t`) - Part of `resource`. See documentation of `projectsId`. + * `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.SecretManager.V1.Model.TestIamPermissionsRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecretManager.V1.Model.TestIamPermissionsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec secretmanager_projects_locations_secrets_test_iam_permissions( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecretManager.V1.Model.TestIamPermissionsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def secretmanager_projects_locations_secrets_test_iam_permissions( + connection, + projects_id, + locations_id, + secrets_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:testIamPermissions", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "secretsId" => URI.encode(secrets_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecretManager.V1.Model.TestIamPermissionsResponse{}] + ) + end + + @doc """ + Accesses a SecretVersion. This call returns the secret data. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `secrets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `versions_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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.SecretManager.V1.Model.AccessSecretVersionResponse{}}` on success + * `{:error, info}` on failure + """ + @spec secretmanager_projects_locations_secrets_versions_access( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecretManager.V1.Model.AccessSecretVersionResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def secretmanager_projects_locations_secrets_versions_access( + connection, + projects_id, + locations_id, + secrets_id, + versions_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:access", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "secretsId" => URI.encode(secrets_id, &URI.char_unreserved?/1), + "versionsId" => URI.encode(versions_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecretManager.V1.Model.AccessSecretVersionResponse{}] + ) + end + + @doc """ + Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `secrets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `versions_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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.SecretManager.V1.Model.DestroySecretVersionRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecretManager.V1.Model.SecretVersion{}}` on success + * `{:error, info}` on failure + """ + @spec secretmanager_projects_locations_secrets_versions_destroy( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecretManager.V1.Model.SecretVersion.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def secretmanager_projects_locations_secrets_versions_destroy( + connection, + projects_id, + locations_id, + secrets_id, + versions_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:destroy", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "secretsId" => URI.encode(secrets_id, &URI.char_unreserved?/1), + "versionsId" => URI.encode(versions_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecretManager.V1.Model.SecretVersion{}]) + end + + @doc """ + Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `secrets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `versions_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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.SecretManager.V1.Model.DisableSecretVersionRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecretManager.V1.Model.SecretVersion{}}` on success + * `{:error, info}` on failure + """ + @spec secretmanager_projects_locations_secrets_versions_disable( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecretManager.V1.Model.SecretVersion.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def secretmanager_projects_locations_secrets_versions_disable( + connection, + projects_id, + locations_id, + secrets_id, + versions_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:disable", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "secretsId" => URI.encode(secrets_id, &URI.char_unreserved?/1), + "versionsId" => URI.encode(versions_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecretManager.V1.Model.SecretVersion{}]) + end + + @doc """ + Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `secrets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `versions_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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.SecretManager.V1.Model.EnableSecretVersionRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecretManager.V1.Model.SecretVersion{}}` on success + * `{:error, info}` on failure + """ + @spec secretmanager_projects_locations_secrets_versions_enable( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecretManager.V1.Model.SecretVersion.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def secretmanager_projects_locations_secrets_versions_enable( + connection, + projects_id, + locations_id, + secrets_id, + versions_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:enable", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "secretsId" => URI.encode(secrets_id, &URI.char_unreserved?/1), + "versionsId" => URI.encode(versions_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecretManager.V1.Model.SecretVersion{}]) + end + + @doc """ + Gets metadata for a SecretVersion. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `secrets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `versions_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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.SecretManager.V1.Model.SecretVersion{}}` on success + * `{:error, info}` on failure + """ + @spec secretmanager_projects_locations_secrets_versions_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecretManager.V1.Model.SecretVersion.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def secretmanager_projects_locations_secrets_versions_get( + connection, + projects_id, + locations_id, + secrets_id, + versions_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "secretsId" => URI.encode(secrets_id, &URI.char_unreserved?/1), + "versionsId" => URI.encode(versions_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecretManager.V1.Model.SecretVersion{}]) + end + + @doc """ + Lists SecretVersions. This call does not return secret data. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `secrets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `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"). + * `:filter` (*type:* `String.t`) - Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secret versions matching the filter. If filter is empty, all secret versions are listed. + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000. + * `:pageToken` (*type:* `String.t`) - Optional. Pagination token, returned earlier via ListSecretVersionsResponse.next_page_token][]. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecretManager.V1.Model.ListSecretVersionsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec secretmanager_projects_locations_secrets_versions_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecretManager.V1.Model.ListSecretVersionsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def secretmanager_projects_locations_secrets_versions_list( + connection, + projects_id, + locations_id, + secrets_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "secretsId" => URI.encode(secrets_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecretManager.V1.Model.ListSecretVersionsResponse{}] + ) + end + + @doc """ + Creates a new SecretVersion containing secret data and attaches it to an existing Secret. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * `secrets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -259,7 +1513,7 @@ defmodule GoogleApi.SecretManager.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name of the project to associate with the Secret, in the format `projects/*`. + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name of the project to associate with the Secret, in the format `projects/*` or `projects/*/locations/*`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -409,7 +1663,7 @@ defmodule GoogleApi.SecretManager.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the Secret, in the format `projects/*/secrets/*`. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the Secret, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * `secrets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -559,7 +1813,7 @@ defmodule GoogleApi.SecretManager.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name of the project associated with the Secrets, in the format `projects/*`. + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name of the project associated with the Secrets, in the format `projects/*` or `projects/*/locations/*` * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -862,7 +2116,7 @@ defmodule GoogleApi.SecretManager.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion. * `secrets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `versions_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters @@ -945,7 +2199,7 @@ defmodule GoogleApi.SecretManager.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*`. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. * `secrets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `versions_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters @@ -1028,7 +2282,7 @@ defmodule GoogleApi.SecretManager.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*`. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. * `secrets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `versions_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters @@ -1111,7 +2365,7 @@ defmodule GoogleApi.SecretManager.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*`. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. * `secrets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `versions_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters @@ -1194,7 +2448,7 @@ defmodule GoogleApi.SecretManager.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion. * `secrets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `versions_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters @@ -1272,7 +2526,7 @@ defmodule GoogleApi.SecretManager.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.SecretManager.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*`. + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * `secrets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. diff --git a/clients/secret_manager/lib/google_api/secret_manager/v1/metadata.ex b/clients/secret_manager/lib/google_api/secret_manager/v1/metadata.ex index c60ba07612..2ba579b2ce 100644 --- a/clients/secret_manager/lib/google_api/secret_manager/v1/metadata.ex +++ b/clients/secret_manager/lib/google_api/secret_manager/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.SecretManager.V1 do API client metadata for GoogleApi.SecretManager.V1. """ - @discovery_revision "20220826" + @discovery_revision "20240220" def discovery_revision(), do: @discovery_revision end diff --git a/clients/secret_manager/lib/google_api/secret_manager/v1/model/access_secret_version_response.ex b/clients/secret_manager/lib/google_api/secret_manager/v1/model/access_secret_version_response.ex index f8842e7474..fdc0c54e06 100644 --- a/clients/secret_manager/lib/google_api/secret_manager/v1/model/access_secret_version_response.ex +++ b/clients/secret_manager/lib/google_api/secret_manager/v1/model/access_secret_version_response.ex @@ -21,7 +21,7 @@ defmodule GoogleApi.SecretManager.V1.Model.AccessSecretVersionResponse do ## Attributes - * `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. + * `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. * `payload` (*type:* `GoogleApi.SecretManager.V1.Model.SecretPayload.t`, *default:* `nil`) - Secret payload """ diff --git a/clients/secret_manager/lib/google_api/secret_manager/v1/model/binding.ex b/clients/secret_manager/lib/google_api/secret_manager/v1/model/binding.ex index d14d8bfc22..1b39d07218 100644 --- a/clients/secret_manager/lib/google_api/secret_manager/v1/model/binding.ex +++ b/clients/secret_manager/lib/google_api/secret_manager/v1/model/binding.ex @@ -22,8 +22,8 @@ defmodule GoogleApi.SecretManager.V1.Model.Binding do ## Attributes * `condition` (*type:* `GoogleApi.SecretManager.V1.Model.Expr.t`, *default:* `nil`) - The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - * `members` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. - * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + * `members` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`. + * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles). """ use GoogleApi.Gax.ModelBase diff --git a/clients/secret_manager/lib/google_api/secret_manager/v1/model/location.ex b/clients/secret_manager/lib/google_api/secret_manager/v1/model/location.ex index 52135e12cb..c6501ffad4 100644 --- a/clients/secret_manager/lib/google_api/secret_manager/v1/model/location.ex +++ b/clients/secret_manager/lib/google_api/secret_manager/v1/model/location.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.SecretManager.V1.Model.Location do @moduledoc """ - A resource that represents Google Cloud Platform location. + A resource that represents a Google Cloud location. ## Attributes diff --git a/clients/secret_manager/lib/google_api/secret_manager/v1/model/policy.ex b/clients/secret_manager/lib/google_api/secret_manager/v1/model/policy.ex index 675f7dfb53..afb8996284 100644 --- a/clients/secret_manager/lib/google_api/secret_manager/v1/model/policy.ex +++ b/clients/secret_manager/lib/google_api/secret_manager/v1/model/policy.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.SecretManager.V1.Model.Policy do @moduledoc """ - An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). ## Attributes diff --git a/clients/secret_manager/lib/google_api/secret_manager/v1/model/secret.ex b/clients/secret_manager/lib/google_api/secret_manager/v1/model/secret.ex index e4285972a6..feb8718f6c 100644 --- a/clients/secret_manager/lib/google_api/secret_manager/v1/model/secret.ex +++ b/clients/secret_manager/lib/google_api/secret_manager/v1/model/secret.ex @@ -27,11 +27,11 @@ defmodule GoogleApi.SecretManager.V1.Model.Secret do * `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. * `labels` (*type:* `map()`, *default:* `nil`) - The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `\\p{Ll}\\p{Lo}{0,62}` Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `[\\p{Ll}\\p{Lo}\\p{N}_-]{0,63}` No more than 64 labels can be assigned to a given resource. * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the Secret in the format `projects/*/secrets/*`. - * `replication` (*type:* `GoogleApi.SecretManager.V1.Model.Replication.t`, *default:* `nil`) - Required. Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created. + * `replication` (*type:* `GoogleApi.SecretManager.V1.Model.Replication.t`, *default:* `nil`) - Optional. Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created. * `rotation` (*type:* `GoogleApi.SecretManager.V1.Model.Rotation.t`, *default:* `nil`) - Optional. Rotation policy attached to the Secret. May be excluded if there is no rotation policy. * `topics` (*type:* `list(GoogleApi.SecretManager.V1.Model.Topic.t)`, *default:* `nil`) - Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions. * `ttl` (*type:* `String.t`, *default:* `nil`) - Input only. The TTL for the Secret. - * `versionAliases` (*type:* `map()`, *default:* `nil`) - Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. At launch Access by Allias will only be supported on GetSecretVersion and AccessSecretVersion. + * `versionAliases` (*type:* `map()`, *default:* `nil`) - Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion. """ use GoogleApi.Gax.ModelBase diff --git a/clients/secret_manager/lib/google_api/secret_manager/v1/model/topic.ex b/clients/secret_manager/lib/google_api/secret_manager/v1/model/topic.ex index c586f34b78..d79fe17fbd 100644 --- a/clients/secret_manager/lib/google_api/secret_manager/v1/model/topic.ex +++ b/clients/secret_manager/lib/google_api/secret_manager/v1/model/topic.ex @@ -21,7 +21,7 @@ defmodule GoogleApi.SecretManager.V1.Model.Topic do ## Attributes - * `name` (*type:* `String.t`, *default:* `nil`) - Required. The resource name of the Pub/Sub topic that will be published to, in the following format: `projects/*/topics/*`. For publication to succeed, the Secret Manager P4SA must have `pubsub.publisher` permissions on the topic. + * `name` (*type:* `String.t`, *default:* `nil`) - Required. The resource name of the Pub/Sub topic that will be published to, in the following format: `projects/*/topics/*`. For publication to succeed, the Secret Manager service agent must have the `pubsub.topic.publish` permission on the topic. The Pub/Sub Publisher role (`roles/pubsub.publisher`) includes this permission. """ use GoogleApi.Gax.ModelBase diff --git a/clients/secret_manager/lib/google_api/secret_manager/v1beta1/metadata.ex b/clients/secret_manager/lib/google_api/secret_manager/v1beta1/metadata.ex index 324e29d10b..96bedca0e9 100644 --- a/clients/secret_manager/lib/google_api/secret_manager/v1beta1/metadata.ex +++ b/clients/secret_manager/lib/google_api/secret_manager/v1beta1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.SecretManager.V1beta1 do API client metadata for GoogleApi.SecretManager.V1beta1. """ - @discovery_revision "20220826" + @discovery_revision "20240220" def discovery_revision(), do: @discovery_revision end diff --git a/clients/secret_manager/lib/google_api/secret_manager/v1beta1/model/binding.ex b/clients/secret_manager/lib/google_api/secret_manager/v1beta1/model/binding.ex index 519121265e..4499dcf360 100644 --- a/clients/secret_manager/lib/google_api/secret_manager/v1beta1/model/binding.ex +++ b/clients/secret_manager/lib/google_api/secret_manager/v1beta1/model/binding.ex @@ -22,8 +22,8 @@ defmodule GoogleApi.SecretManager.V1beta1.Model.Binding do ## Attributes * `condition` (*type:* `GoogleApi.SecretManager.V1beta1.Model.Expr.t`, *default:* `nil`) - The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - * `members` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. - * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + * `members` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`. + * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles). """ use GoogleApi.Gax.ModelBase diff --git a/clients/secret_manager/lib/google_api/secret_manager/v1beta1/model/location.ex b/clients/secret_manager/lib/google_api/secret_manager/v1beta1/model/location.ex index 5147384056..faaeb18a89 100644 --- a/clients/secret_manager/lib/google_api/secret_manager/v1beta1/model/location.ex +++ b/clients/secret_manager/lib/google_api/secret_manager/v1beta1/model/location.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.SecretManager.V1beta1.Model.Location do @moduledoc """ - A resource that represents Google Cloud Platform location. + A resource that represents a Google Cloud location. ## Attributes diff --git a/clients/secret_manager/lib/google_api/secret_manager/v1beta1/model/policy.ex b/clients/secret_manager/lib/google_api/secret_manager/v1beta1/model/policy.ex index 76ae595b09..c76edcb5ed 100644 --- a/clients/secret_manager/lib/google_api/secret_manager/v1beta1/model/policy.ex +++ b/clients/secret_manager/lib/google_api/secret_manager/v1beta1/model/policy.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.SecretManager.V1beta1.Model.Policy do @moduledoc """ - An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). ## Attributes