Class AwsEc2AuthenticationOptions.AwsEc2AuthenticationOptionsBuilder
java.lang.Object
org.springframework.vault.authentication.AwsEc2AuthenticationOptions.AwsEc2AuthenticationOptionsBuilder
- Enclosing class:
- AwsEc2AuthenticationOptions
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build a newAwsEc2AuthenticationOptionsinstance.identityDocumentUri(URI identityDocumentUri) Configure the Identity DocumentURI.metadataTokenRequestUri(URI metadataTokenRequestUri) Configure the Identity Metadata token requestURI.metadataTokenTtl(Duration ttl) Configure the Instance Service Metadata v2 Token TTL.Configure aAwsEc2AuthenticationOptions.Noncefor login requests.Configure the mount path.Configure the name of the role against which the login is being attempted.If role is not specified, then the login endpoint looks for a role bearing the name of the AMI ID of the EC2 instance that is trying to login.Configure the Instance Service Metadataversion.
-
Method Details
-
path
Configure the mount path.- Parameters:
path- must not be empty or null.- Returns:
thisAwsEc2AuthenticationOptions.AwsEc2AuthenticationOptionsBuilder.
-
identityDocumentUri
public AwsEc2AuthenticationOptions.AwsEc2AuthenticationOptionsBuilder identityDocumentUri(URI identityDocumentUri) Configure the Identity DocumentURI.- Parameters:
identityDocumentUri- must not be null.- Returns:
thisAwsEc2AuthenticationOptions.AwsEc2AuthenticationOptionsBuilder.- See Also:
-
role
Configure the name of the role against which the login is being attempted.If role is not specified, then the login endpoint looks for a role bearing the name of the AMI ID of the EC2 instance that is trying to login.- Parameters:
role- may be empty or null.- Returns:
thisAwsEc2AuthenticationOptions.AwsEc2AuthenticationOptionsBuilder.
-
nonce
public AwsEc2AuthenticationOptions.AwsEc2AuthenticationOptionsBuilder nonce(AwsEc2AuthenticationOptions.Nonce nonce) Configure aAwsEc2AuthenticationOptions.Noncefor login requests. Defaults toAwsEc2AuthenticationOptions.Nonce.generated().- Parameters:
nonce- must not be null.- Returns:
thisAwsEc2AuthenticationOptions.AwsEc2AuthenticationOptionsBuilder.- Since:
- 1.1
-
metadataTokenTtl
public AwsEc2AuthenticationOptions.AwsEc2AuthenticationOptionsBuilder metadataTokenTtl(Duration ttl) Configure the Instance Service Metadata v2 Token TTL. Defaults to 1 minute.- Parameters:
ttl- must not be null.- Returns:
thisAwsEc2AuthenticationOptions.AwsEc2AuthenticationOptionsBuilder.- Since:
- 3.2
-
metadataTokenRequestUri
public AwsEc2AuthenticationOptions.AwsEc2AuthenticationOptionsBuilder metadataTokenRequestUri(URI metadataTokenRequestUri) Configure the Identity Metadata token requestURI.- Parameters:
metadataTokenRequestUri- must not be null.- Returns:
thisAwsEc2AuthenticationOptions.AwsEc2AuthenticationOptionsBuilder.- Since:
- 3.2
- See Also:
-
version
public AwsEc2AuthenticationOptions.AwsEc2AuthenticationOptionsBuilder version(AwsEc2AuthenticationOptions.InstanceMetadataServiceVersion version) Configure the Instance Service Metadataversion. Defaults toAwsEc2AuthenticationOptions.InstanceMetadataServiceVersion.V1.- Parameters:
version- must not be null.- Returns:
thisAwsEc2AuthenticationOptions.AwsEc2AuthenticationOptionsBuilder.- Since:
- 3.2
-
build
Build a newAwsEc2AuthenticationOptionsinstance.- Returns:
- a new
AwsEc2AuthenticationOptions.
-