class Aws::STS::Presigner

)
headers: {“X-K8s-Aws-Id” => ‘my-eks-cluster’}
url = signer.get_caller_identity_presigned_url(
signer = Aws::STS::Presigner.new
@example
Allows you to create presigned URLs for STS operations.

def get_caller_identity_presigned_url(options = {})

Returns:
  • (String) - A presigned url string.

Options Hash: (**options)
  • :headers (Hash) --
def get_caller_identity_presigned_url(options = {})
  req = @client.build_request(:get_session_token, {})
  param_list = Aws::Query::ParamList.new
  param_list.set('Action', 'GetCallerIdentity')
  param_list.set('Version', req.context.config.api.version)
  Aws::Query::EC2ParamBuilder.new(param_list)
    .apply(req.context.operation.input, {})
  signer = Aws::Sigv4::Signer.new(
    service: 'sts',
    region: req.context.config.region,
    credentials_provider: req.context.config.credentials
  )
  url = Aws::Partitions::EndpointProvider.resolve(
    req.context.config.region, 'sts', 'regional'
  )
  url += "/?#{param_list}"
  signer.presign_url(
    http_method: 'GET',
    url: url,
    body: '',
    headers: options[:headers]
  ).to_s
end

def initialize(options = {})

Options Hash: (**options)
  • :client (Client) -- Optionally provide an existing
def initialize(options = {})
  @client = options[:client] || Aws::STS::Client.new
end