Class DomainJoinedCredentialSpec

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ecs.CredentialSpec
software.amazon.awscdk.services.ecs.DomainJoinedCredentialSpec
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-25T14:21:14.579Z") @Stability(Stable) public class DomainJoinedCredentialSpec extends CredentialSpec
Credential specification (CredSpec) file.

Example:

 // Make sure the task definition's execution role has permissions to read from the S3 bucket or SSM parameter where the CredSpec file is stored.
 IParameter parameter;
 TaskDefinition taskDefinition;
 // Domain-joined gMSA container from a SSM parameter
 taskDefinition.addContainer("gmsa-domain-joined-container", ContainerDefinitionOptions.builder()
         .image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample"))
         .cpu(128)
         .memoryLimitMiB(256)
         .credentialSpecs(List.of(DomainJoinedCredentialSpec.fromSsmParameter(parameter)))
         .build());
 
  • Constructor Details

    • DomainJoinedCredentialSpec

      protected DomainJoinedCredentialSpec(software.amazon.jsii.JsiiObjectRef objRef)
    • DomainJoinedCredentialSpec

      protected DomainJoinedCredentialSpec(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • DomainJoinedCredentialSpec

      @Stability(Stable) public DomainJoinedCredentialSpec(@NotNull String fileLocation)
      Parameters:
      fileLocation - Location or ARN from where to retrieve the CredSpec file. This parameter is required.
  • Method Details

    • fromS3Bucket

      @Stability(Stable) @NotNull public static DomainJoinedCredentialSpec fromS3Bucket(@NotNull IBucket bucket, @NotNull String key)
      Loads the CredSpec from a S3 bucket object.

      Parameters:
      bucket - The S3 bucket. This parameter is required.
      key - The object key. This parameter is required.
      Returns:
      CredSpec with it's locations set to the S3 object's ARN.
    • fromSsmParameter

      @Stability(Stable) @NotNull public static DomainJoinedCredentialSpec fromSsmParameter(@NotNull IParameter parameter)
      Loads the CredSpec from a SSM parameter.

      Parameters:
      parameter - The SSM parameter. This parameter is required.
      Returns:
      CredSpec with it's locations set to the SSM parameter's ARN.