Interface IssueWorkloadIdentityContextResponse.Builder

  • Method Details

    • providedContext

      The context to pass to AssumeRole in ProvidedContexts. ProviderArn is the ARN of the workload identity provider that issued the context. ContextAssertion is the signed and encrypted context. It is present only if the request specified TargetRoleArn.

      Pass the context as the only entry in ProvidedContexts. Treat the context assertion like a credential until it expires.

      Parameters:
      providedContext - The context to pass to AssumeRole in ProvidedContexts. ProviderArn is the ARN of the workload identity provider that issued the context. ContextAssertion is the signed and encrypted context. It is present only if the request specified TargetRoleArn.

      Pass the context as the only entry in ProvidedContexts. Treat the context assertion like a credential until it expires.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • providedContext

      The context to pass to AssumeRole in ProvidedContexts. ProviderArn is the ARN of the workload identity provider that issued the context. ContextAssertion is the signed and encrypted context. It is present only if the request specified TargetRoleArn.

      Pass the context as the only entry in ProvidedContexts. Treat the context assertion like a credential until it expires.

      This is a convenience method that creates an instance of the ProvidedContext.Builder avoiding the need to create one manually via ProvidedContext.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to providedContext(ProvidedContext).

      Parameters:
      providedContext - a consumer that will call methods on ProvidedContext.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • subject

      The identifier of the workload, up to 256 characters. For a workload identity provider that uses the SPIFFE naming scheme, this is the SPIFFE ID of the workload, for example spiffe://example.org/payments/checkout. A role session from this context carries this value as the identity of the workload.

      Parameters:
      subject - The identifier of the workload, up to 256 characters. For a workload identity provider that uses the SPIFFE naming scheme, this is the SPIFFE ID of the workload, for example spiffe://example.org/payments/checkout. A role session from this context carries this value as the identity of the workload.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • audience

      The Amazon Web Services service principal that can pass the context to AssumeRole. This is the service principal of the caller. Present only if the request specified TargetRoleArn.

      Parameters:
      audience - The Amazon Web Services service principal that can pass the context to AssumeRole. This is the service principal of the caller. Present only if the request specified TargetRoleArn.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • expiration

      The date and time, in UTC, after which AssumeRole no longer accepts the context. Present only if the request specified TargetRoleArn.

      Parameters:
      expiration - The date and time, in UTC, after which AssumeRole no longer accepts the context. Present only if the request specified TargetRoleArn.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sessionExpiration

      IssueWorkloadIdentityContextResponse.Builder sessionExpiration(Instant sessionExpiration)

      The latest date and time, in UTC, at which a role session from this context can end. Present only if the request specified both TargetRoleArn and SessionDurationSeconds.

      Parameters:
      sessionExpiration - The latest date and time, in UTC, at which a role session from this context can end. Present only if the request specified both TargetRoleArn and SessionDurationSeconds.
      Returns:
      Returns a reference to this object so that method calls can be chained together.