Class: Google::Apis::AgentidentitycredentialsV1::AgentIdentityCredentialsService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/agentidentitycredentials_v1/service.rb

Overview

Agent Identity Credentials API

The Agent Identity Credentials API retrieves and finalizes authorization credentials for auth providers.

Examples:

require 'google/apis/agentidentitycredentials_v1'

Agentidentitycredentials = Google::Apis::AgentidentitycredentialsV1 # Alias the module
service = Agentidentitycredentials::AgentIdentityCredentialsService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://agentidentitycredentials.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAgentIdentityCredentialsService

Returns a new instance of AgentIdentityCredentialsService.



48
49
50
51
52
53
# File 'lib/google/apis/agentidentitycredentials_v1/service.rb', line 48

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-agentidentitycredentials_v1',
        client_version: Google::Apis::AgentidentitycredentialsV1::GEM_VERSION)
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns 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.

Returns:

  • (String)

    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.



41
42
43
# File 'lib/google/apis/agentidentitycredentials_v1/service.rb', line 41

def key
  @key
end

#quota_userString

Returns 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.

Returns:

  • (String)

    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.



46
47
48
# File 'lib/google/apis/agentidentitycredentials_v1/service.rb', line 46

def quota_user
  @quota_user
end

Instance Method Details

#finalize_project_location_auth_provider_credential(auth_provider, google_cloud_agentidentitycredentials_v1_finalize_credentials_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AgentidentitycredentialsV1::GoogleCloudAgentidentitycredentialsV1FinalizeCredentialsResponse

Finalizes the credentials after a successful consent flow.

Parameters:

  • auth_provider (String)

    Required. The resource name of the auth provider. Format: projects/project/ locations/location/authProviders/auth_provider``

  • google_cloud_agentidentitycredentials_v1_finalize_credentials_request_object (Google::Apis::AgentidentitycredentialsV1::GoogleCloudAgentidentitycredentialsV1FinalizeCredentialsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



77
78
79
80
81
82
83
84
85
86
87
# File 'lib/google/apis/agentidentitycredentials_v1/service.rb', line 77

def finalize_project_location_auth_provider_credential(auth_provider, google_cloud_agentidentitycredentials_v1_finalize_credentials_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+authProvider}/credentials:finalize', options)
  command.request_representation = Google::Apis::AgentidentitycredentialsV1::GoogleCloudAgentidentitycredentialsV1FinalizeCredentialsRequest::Representation
  command.request_object = google_cloud_agentidentitycredentials_v1_finalize_credentials_request_object
  command.response_representation = Google::Apis::AgentidentitycredentialsV1::GoogleCloudAgentidentitycredentialsV1FinalizeCredentialsResponse::Representation
  command.response_class = Google::Apis::AgentidentitycredentialsV1::GoogleCloudAgentidentitycredentialsV1FinalizeCredentialsResponse
  command.params['authProvider'] = auth_provider unless auth_provider.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#retrieve_project_location_auth_provider_credential(auth_provider, google_cloud_agentidentitycredentials_v1_retrieve_credentials_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AgentidentitycredentialsV1::GoogleCloudAgentidentitycredentialsV1RetrieveCredentialsResponse

Retrieves authorization credentials for an auth provider, or indicates what action needs to be taken to obtain credentials. If the token field in the response is populated, credential retrieval was successful. If one of the fields in the result oneof is populated, further action is required to obtain credentials, such as redirecting the user for consent. View comments on RetrieveCredentialsResponse for more information.

Parameters:

  • auth_provider (String)

    Required. The resource name of the auth provider. Format: projects/project/ locations/location/authProviders/auth_provider``

  • google_cloud_agentidentitycredentials_v1_retrieve_credentials_request_object (Google::Apis::AgentidentitycredentialsV1::GoogleCloudAgentidentitycredentialsV1RetrieveCredentialsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



116
117
118
119
120
121
122
123
124
125
126
# File 'lib/google/apis/agentidentitycredentials_v1/service.rb', line 116

def retrieve_project_location_auth_provider_credential(auth_provider, google_cloud_agentidentitycredentials_v1_retrieve_credentials_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+authProvider}/credentials:retrieve', options)
  command.request_representation = Google::Apis::AgentidentitycredentialsV1::GoogleCloudAgentidentitycredentialsV1RetrieveCredentialsRequest::Representation
  command.request_object = google_cloud_agentidentitycredentials_v1_retrieve_credentials_request_object
  command.response_representation = Google::Apis::AgentidentitycredentialsV1::GoogleCloudAgentidentitycredentialsV1RetrieveCredentialsResponse::Representation
  command.response_class = Google::Apis::AgentidentitycredentialsV1::GoogleCloudAgentidentitycredentialsV1RetrieveCredentialsResponse
  command.params['authProvider'] = auth_provider unless auth_provider.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end