Interface FargateServiceAttributes
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
FargateServiceAttributes.Jsii$Proxy
@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)",
date="2026-09-02T11:03:09.335Z")
@Stability(Stable)
public interface FargateServiceAttributes
extends software.amazon.jsii.JsiiSerializable
The properties to import from the service using the Fargate launch type.
Example:
Cluster cluster;
// Import service from EC2 service attributes
IBaseService ec2ServiceFromAttributes = Ec2Service.fromEc2ServiceAttributes(this, "Ec2ServiceFromAttributes", Ec2ServiceAttributes.builder()
.serviceArn("arn:aws:ecs:us-west-2:123456789012:service/my-http-service")
.cluster(cluster)
.build());
// Import service from EC2 service ARN
IEc2Service ec2ServiceFromArn = Ec2Service.fromEc2ServiceArn(this, "Ec2ServiceFromArn", "arn:aws:ecs:us-west-2:123456789012:service/my-http-service");
// Import service from Fargate service attributes
IBaseService fargateServiceFromAttributes = FargateService.fromFargateServiceAttributes(this, "FargateServiceFromAttributes", FargateServiceAttributes.builder()
.serviceArn("arn:aws:ecs:us-west-2:123456789012:service/my-http-service")
.cluster(cluster)
.build());
// Import service from Fargate service ARN
IFargateService fargateServiceFromArn = FargateService.fromFargateServiceArn(this, "FargateServiceFromArn", "arn:aws:ecs:us-west-2:123456789012:service/my-http-service");
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forFargateServiceAttributesstatic final classAn implementation forFargateServiceAttributes -
Method Summary
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCluster
The cluster that hosts the service. -
getServiceArn
The service ARN.Default: - either this, or `serviceName`, is required
-
getServiceName
The name of the service.Default: - either this, or `serviceArn`, is required
-
builder
- Returns:
- a
FargateServiceAttributes.BuilderofFargateServiceAttributes
-