@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:07.417Z") @Stability(value=Experimental) public class FargateService extends BaseService implements IFargateService
Example:
Vpc vpc;
Cluster cluster = Cluster.Builder.create(this, "FargateCPCluster")
.vpc(vpc)
.enableFargateCapacityProviders(true)
.build();
FargateTaskDefinition taskDefinition = new FargateTaskDefinition(this, "TaskDef");
taskDefinition.addContainer("web", ContainerDefinitionOptions.builder()
.image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample"))
.build());
FargateService.Builder.create(this, "FargateService")
.cluster(cluster)
.taskDefinition(taskDefinition)
.capacityProviderStrategies(List.of(CapacityProviderStrategy.builder()
.capacityProvider("FARGATE_SPOT")
.weight(2)
.build(), CapacityProviderStrategy.builder()
.capacityProvider("FARGATE")
.weight(1)
.build()))
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
FargateService.Builder
(experimental) A fluent builder for
FargateService. |
software.amazon.jsii.JsiiObject.InitializationModeIFargateService.Jsii$Default, IFargateService.Jsii$ProxyIBaseService.Jsii$DefaultIApplicationLoadBalancerTarget.Jsii$DefaultINetworkLoadBalancerTarget.Jsii$DefaultILoadBalancerTarget.Jsii$Default| Modifier | Constructor and Description |
|---|---|
|
FargateService(software.constructs.Construct scope,
String id,
FargateServiceProps props)
(experimental) Constructs a new instance of the FargateService class.
|
protected |
FargateService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
FargateService(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static IFargateService |
fromFargateServiceArn(software.constructs.Construct scope,
String id,
String fargateServiceArn)
(experimental) Imports from the specified service ARN.
|
static IBaseService |
fromFargateServiceAttributes(software.constructs.Construct scope,
String id,
FargateServiceAttributes attrs)
(experimental) Imports from the specified service attrributes.
|
associateCloudMapService, attachToApplicationTargetGroup, attachToClassicLB, attachToNetworkTargetGroup, autoScaleTaskCount, configureAwsVpcNetworking, configureAwsVpcNetworking, configureAwsVpcNetworking, configureAwsVpcNetworking, configureAwsVpcNetworkingWithSecurityGroups, configureAwsVpcNetworkingWithSecurityGroups, configureAwsVpcNetworkingWithSecurityGroups, configureAwsVpcNetworkingWithSecurityGroups, enableCloudMap, getCloudmapService, getCloudMapService, getCluster, getConnections, getLoadBalancers, getNetworkConfiguration, getServiceArn, getServiceName, getServiceRegistries, getTaskDefinition, loadBalancerTarget, metric, metric, metricCpuUtilization, metricCpuUtilization, metricMemoryUtilization, metricMemoryUtilization, registerLoadBalancerTargets, setCloudmapService, setLoadBalancers, setNetworkConfiguration, setServiceRegistriesapplyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcegetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetServiceArn, getServiceNameapplyRemovalPolicy, getEnv, getStackgetNodeprotected FargateService(software.amazon.jsii.JsiiObjectRef objRef)
protected FargateService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public FargateService(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
FargateServiceProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Experimental) @NotNull public static IFargateService fromFargateServiceArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String fargateServiceArn)
scope - This parameter is required.id - This parameter is required.fargateServiceArn - This parameter is required.@Stability(value=Experimental) @NotNull public static IBaseService fromFargateServiceAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull FargateServiceAttributes attrs)
scope - This parameter is required.id - This parameter is required.attrs - This parameter is required.Copyright © 2022. All rights reserved.