lib/oci/identity/identity_client.rb
def create_customer_secret_key(create_customer_secret_key_details, user_id, opts = {})
      logger.debug 'Calling operation IdentityClient#create_customer_secret_key.' if logger

      raise "Missing the required parameter 'create_customer_secret_key_details' when calling create_customer_secret_key." if create_customer_secret_key_details.nil?
      raise "Missing the required parameter 'user_id' when calling create_customer_secret_key." if user_id.nil?
      raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

      path = '/users/{userId}/customerSecretKeys/'.sub('{userId}', user_id.to_s)
      operation_signing_strategy = :standard

      # rubocop:disable Style/NegatedIf
      # Query Params
      query_params = {}

      # Header Params
      header_params = {}
      header_params[:accept] = 'application/json'
      header_params[:'content-type'] = 'application/json'
      header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
      # rubocop:enable Style/NegatedIf
      header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

      post_body = @api_client.object_to_http_body(create_customer_secret_key_details)

      # rubocop:disable Metrics/BlockLength
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_customer_secret_key') do
        @api_client.call_api(
          :POST,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body,
          return_type: 'OCI::Identity::Models::CustomerSecretKey'
        )
      end
      # rubocop:enable Metrics/BlockLength
    end
# Creates a new secret key for the specified user. Secret keys are used for authentication with the Object Storage Service's Amazon S3
# compatible API. For information, see
# [Managing User Credentials](https://docs.cloud.oracle.com/Content/Identity/Tasks/managingcredentials.htm).
#
# You must specify a *description* for the secret key (although it can be an empty string). It does not
# have to be unique, and you can change it anytime with
# {#update_customer_secret_key update_customer_secret_key}.
#
# Every user has permission to create a secret key for *their own user ID*. An administrator in your organization
# does not need to write a policy to give users this ability. To compare, administrators who have permission to the
# tenancy can use this operation to create a secret key for any user, including themselves.
#
# @param [OCI::Identity::Models::CreateCustomerSecretKeyDetails] create_customer_secret_key_details Request object for creating a new secret key.
# @param [String] user_id The OCID of the user.
# @param [Hash] opts the optional parameters
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
#   retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
#   server error without risk of executing that same action again. Retry tokens expire after 24
#   hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
#   has been deleted and purged from the system, then a retry of the original creation request
#   may be rejected).
#
# @return [Response] A Response object with data of type {OCI::Identity::Models::CustomerSecretKey CustomerSecretKey}
Creates a new secret key for the specified user. Secret keys are used for authentication with the Object Storage Service's Amazon S3
compatible API. For information, see
[Managing User Credentials].

You must specify a *description* for the secret key (although it can be an empty string). It does not
have to be unique, and you can change it anytime with
{#update_customer_secret_key update_customer_secret_key}.

Every user has permission to create a secret key for *their own user ID*. An administrator in your organization
does not need to write a policy to give users this ability. To compare, administrators who have permission to the
tenancy can use this operation to create a secret key for any user, including themselves.
Creates a new secret key for the specified user . Secret keys are used for authentication with the Object Storage Service ' s Amazon S3 compatible API . For information see [ Managing User Credentials ] . You must specify a * description * for the secret key ( although it can be an empty string ) . It does not have to be unique and you can change it anytime with { #update_customer_secret_key update_customer_secret_key } . Every user has permission to create a secret key for * their own user ID * . An administrator in your organization does not need to write a policy to give users this ability . To compare administrators who have permission to the tenancy can use this operation to create a secret key for any user including themselves .
def create_customer_secret_key(create_customer_secret_key_details, user_id, opts = {})
      logger.debug 'Calling operation IdentityClient#create_customer_secret_key.' if logger
      raise "Missing the required parameter 'create_customer_secret_key_details' when calling create_customer_secret_key." if create_customer_secret_key_details.nil?
      raise "Missing the required parameter 'user_id' when calling create_customer_secret_key." if user_id.nil?
      raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)
      path = '/users/{userId}/customerSecretKeys/'.sub('{userId}', user_id.to_s)
      operation_signing_strategy = :standard
      query_params = {}
      header_params = {}
      header_params[:accept] = 'application/json'
      header_params[:'content-type'] = 'application/json'
      header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
      header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
      post_body = @api_client.object_to_http_body(create_customer_secret_key_details)
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_customer_secret_key') do
        @api_client.call_api(
          :POST,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body,
          return_type: 'OCI::Identity::Models::CustomerSecretKey'
        )
      end
    end
def create_customer_secret_key ( create_customer_secret_key_details , user_id , opts = { } ) logger . debug 'Calling operation IdentityClient#create_customer_secret_key.' if logger raise "Missing the required parameter 'create_customer_secret_key_details' when calling create_customer_secret_key." if create_customer_secret_key_details . nil? raise "Missing the required parameter 'user_id' when calling create_customer_secret_key." if user_id . nil? raise "Parameter value for 'user_id' must not be blank" if OCI :: Internal :: Util . blank_string? ( user_id ) path = '/users/{userId}/customerSecretKeys/' . sub ( '{userId}' , user_id . to_s ) operation_signing_strategy = :standard query_params = { } header_params = { } header_params [ :accept ] = 'application/json' header_params [ :' content-type ' ] = 'application/json' header_params [ :' opc-retry-token ' ] = opts [ :opc_retry_token ] if opts [ :opc_retry_token ] header_params [ :' opc-retry-token ' ] ||= OCI :: Retry . generate_opc_retry_token post_body = @api_client . object_to_http_body ( create_customer_secret_key_details ) OCI :: Retry . make_retrying_call ( applicable_retry_config ( opts ) , call_name : 'IdentityClient#create_customer_secret_key' ) do @api_client . call_api ( :POST , path , endpoint , header_params : header_params , query_params : query_params , operation_signing_strategy : operation_signing_strategy , body : post_body , return_type : 'OCI::Identity::Models::CustomerSecretKey' ) end end
Creates a new secret key for the specified user.
Creates a new secret key for the specified user .
# rubocop:disable Style/NegatedIf # Query Params # Header Params # rubocop:enable Style/NegatedIf # rubocop:disable Metrics/BlockLength # rubocop:enable Metrics/BlockLength
A Response object with data of type {OCI::Identity::Models::CustomerSecretKey CustomerSecretKey}
A Response object with data of type { OCI :: Identity :: Models :: CustomerSecretKey CustomerSecretKey }
Response
create_customer_secret_key_details
user_id
opts
:opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations .
: opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again . Retry tokens expire after 24 hours but can be invalidated before then due to conflicting operations .
opts the optional parameters
opts the optional parameters