@Generated(value="jsii-pacmak/1.30.0 (build adae23f)", date="2021-06-30T10:01:06.735Z") @Stability(value=Experimental) public abstract class BaseService extends Resource implements IBaseService, IApplicationLoadBalancerTarget, INetworkLoadBalancerTarget, ILoadBalancerTarget
software.amazon.jsii.JsiiObject.InitializationModeIBaseService.Jsii$DefaultIApplicationLoadBalancerTarget.Jsii$DefaultINetworkLoadBalancerTarget.Jsii$DefaultILoadBalancerTarget.Jsii$Default| Modifier | Constructor and Description |
|---|---|
protected |
BaseService(software.constructs.Construct scope,
String id,
BaseServiceProps props,
Object additionalProps,
TaskDefinition taskDefinition)
(experimental) Constructs a new instance of the BaseService class.
|
protected |
BaseService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
BaseService(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
associateCloudMapService(AssociateCloudMapServiceOptions options)
(experimental) Associates this service with a CloudMap service.
|
LoadBalancerTargetProps |
attachToApplicationTargetGroup(IApplicationTargetGroup targetGroup)
(experimental) This method is called to attach this service to an Application Load Balancer.
|
void |
attachToClassicLB(LoadBalancer loadBalancer)
(experimental) Registers the service as a target of a Classic Load Balancer (CLB).
|
LoadBalancerTargetProps |
attachToNetworkTargetGroup(INetworkTargetGroup targetGroup)
(experimental) This method is called to attach this service to a Network Load Balancer.
|
ScalableTaskCount |
autoScaleTaskCount(EnableScalingProps props)
(experimental) An attribute representing the minimum and maximum task count for an AutoScalingGroup.
|
protected void |
configureAwsVpcNetworkingWithSecurityGroups(IVpc vpc)
(experimental) This method is called to create a networkConfiguration.
|
protected void |
configureAwsVpcNetworkingWithSecurityGroups(IVpc vpc,
Boolean assignPublicIp)
(experimental) This method is called to create a networkConfiguration.
|
protected void |
configureAwsVpcNetworkingWithSecurityGroups(IVpc vpc,
Boolean assignPublicIp,
SubnetSelection vpcSubnets)
(experimental) This method is called to create a networkConfiguration.
|
protected void |
configureAwsVpcNetworkingWithSecurityGroups(IVpc vpc,
Boolean assignPublicIp,
SubnetSelection vpcSubnets,
List<ISecurityGroup> securityGroups)
(experimental) This method is called to create a networkConfiguration.
|
Service |
enableCloudMap(CloudMapOptions options)
(experimental) Enable CloudMap service discovery for the service.
|
protected Service |
getCloudmapService()
(experimental) The details of the AWS Cloud Map service.
|
IService |
getCloudMapService()
(experimental) The CloudMap service created for this service, if any.
|
ICluster |
getCluster()
(experimental) The cluster that hosts the service.
|
Connections |
getConnections()
(experimental) The security groups which manage the allowed network traffic for the service.
|
protected List<CfnService.LoadBalancerProperty> |
getLoadBalancers()
(experimental) A list of Elastic Load Balancing load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
|
protected CfnService.NetworkConfigurationProperty |
getNetworkConfiguration()
(experimental) A list of Elastic Load Balancing load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
|
String |
getServiceArn()
(experimental) The Amazon Resource Name (ARN) of the service.
|
String |
getServiceName()
(experimental) The name of the service.
|
protected List<CfnService.ServiceRegistryProperty> |
getServiceRegistries()
(experimental) The details of the service discovery registries to assign to this service.
|
TaskDefinition |
getTaskDefinition()
(experimental) The task definition to use for tasks in the service.
|
IEcsLoadBalancerTarget |
loadBalancerTarget(LoadBalancerTargetOptions options)
(experimental) Return a load balancing target for a specific container and port.
|
Metric |
metric(String metricName)
(experimental) This method returns the specified CloudWatch metric name for this service.
|
Metric |
metric(String metricName,
MetricOptions props)
(experimental) This method returns the specified CloudWatch metric name for this service.
|
Metric |
metricCpuUtilization()
(experimental) This method returns the CloudWatch metric for this service's CPU utilization.
|
Metric |
metricCpuUtilization(MetricOptions props)
(experimental) This method returns the CloudWatch metric for this service's CPU utilization.
|
Metric |
metricMemoryUtilization()
(experimental) This method returns the CloudWatch metric for this service's memory utilization.
|
Metric |
metricMemoryUtilization(MetricOptions props)
(experimental) This method returns the CloudWatch metric for this service's memory utilization.
|
void |
registerLoadBalancerTargets(EcsTarget... targets)
(experimental) Use this function to create all load balancer targets to be registered in this service, add them to target groups, and attach target groups to listeners accordingly.
|
protected void |
setCloudmapService(Service value)
(experimental) The details of the AWS Cloud Map service.
|
protected void |
setLoadBalancers(List<CfnService.LoadBalancerProperty> value)
(experimental) A list of Elastic Load Balancing load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
|
protected void |
setNetworkConfiguration(CfnService.NetworkConfigurationProperty value)
(experimental) A list of Elastic Load Balancing load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
|
protected void |
setServiceRegistries(List<CfnService.ServiceRegistryProperty> value)
(experimental) The details of the service discovery registries to assign to this service.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected BaseService(software.amazon.jsii.JsiiObjectRef objRef)
protected BaseService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
protected BaseService(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
BaseServiceProps props,
@NotNull
Object additionalProps,
@NotNull
TaskDefinition taskDefinition)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.additionalProps - This parameter is required.taskDefinition - This parameter is required.@Stability(value=Experimental)
public void associateCloudMapService(@NotNull
AssociateCloudMapServiceOptions options)
options - This parameter is required.@Stability(value=Experimental) @NotNull public LoadBalancerTargetProps attachToApplicationTargetGroup(@NotNull IApplicationTargetGroup targetGroup)
Don't call this function directly. Instead, call listener.addTargets()
to add this service to a load balancer.
attachToApplicationTargetGroup in interface IApplicationLoadBalancerTargettargetGroup - This parameter is required.@Stability(value=Experimental)
public void attachToClassicLB(@NotNull
LoadBalancer loadBalancer)
Don't call this. Call loadBalancer.addTarget() instead.
attachToClassicLB in interface ILoadBalancerTargetloadBalancer - This parameter is required.@Stability(value=Experimental) @NotNull public LoadBalancerTargetProps attachToNetworkTargetGroup(@NotNull INetworkTargetGroup targetGroup)
Don't call this function directly. Instead, call listener.addTargets()
to add this service to a load balancer.
attachToNetworkTargetGroup in interface INetworkLoadBalancerTargettargetGroup - This parameter is required.@Stability(value=Experimental) @NotNull public ScalableTaskCount autoScaleTaskCount(@NotNull EnableScalingProps props)
props - This parameter is required.@Stability(value=Experimental)
protected void configureAwsVpcNetworkingWithSecurityGroups(@NotNull
IVpc vpc,
@Nullable
Boolean assignPublicIp,
@Nullable
SubnetSelection vpcSubnets,
@Nullable
List<ISecurityGroup> securityGroups)
vpc - This parameter is required.assignPublicIp - vpcSubnets - securityGroups - @Stability(value=Experimental)
protected void configureAwsVpcNetworkingWithSecurityGroups(@NotNull
IVpc vpc,
@Nullable
Boolean assignPublicIp,
@Nullable
SubnetSelection vpcSubnets)
vpc - This parameter is required.assignPublicIp - vpcSubnets - @Stability(value=Experimental)
protected void configureAwsVpcNetworkingWithSecurityGroups(@NotNull
IVpc vpc,
@Nullable
Boolean assignPublicIp)
vpc - This parameter is required.assignPublicIp - @Stability(value=Experimental)
protected void configureAwsVpcNetworkingWithSecurityGroups(@NotNull
IVpc vpc)
vpc - This parameter is required.@Stability(value=Experimental) @NotNull public Service enableCloudMap(@NotNull CloudMapOptions options)
options - This parameter is required.@Stability(value=Experimental) @NotNull public IEcsLoadBalancerTarget loadBalancerTarget(@NotNull LoadBalancerTargetOptions options)
Use this function to create a load balancer target if you want to load balance to another container than the first essential container or the first mapped port on the container.
Use the return value of this function where you would normally use a load balancer
target, instead of the Service object itself.
Example:
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826 listener.addTargets("ECS", Map.of( "port", 80, "targets", asList(service.loadBalancerTarget(Map.of( "containerName", "MyContainer", "containerPort", 1234)))));
options - This parameter is required.@Stability(value=Experimental) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
metricName - This parameter is required.props - @Stability(value=Experimental) @NotNull public Metric metric(@NotNull String metricName)
metricName - This parameter is required.@Stability(value=Experimental) @NotNull public Metric metricCpuUtilization(@Nullable MetricOptions props)
Default: average over 5 minutes
props - @Stability(value=Experimental) @NotNull public Metric metricCpuUtilization()
Default: average over 5 minutes
@Stability(value=Experimental) @NotNull public Metric metricMemoryUtilization(@Nullable MetricOptions props)
Default: average over 5 minutes
props - @Stability(value=Experimental) @NotNull public Metric metricMemoryUtilization()
Default: average over 5 minutes
@Stability(value=Experimental)
public void registerLoadBalancerTargets(@NotNull
EcsTarget... targets)
Alternatively, you can use listener.addTargets() to create targets and add them to target groups.
Example:
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826 service.registerLoadBalancerTargets(Map.of( "containerName", "web", "containerPort", 80, "newTargetGroupId", "ECS", "listener", ecs.ListenerConfig.applicationListener(listener, Map.of( "protocol", elbv2.ApplicationProtocol.getHTTPS()))));
targets - This parameter is required.@Stability(value=Experimental) @NotNull public ICluster getCluster()
getCluster in interface IBaseService@Stability(value=Experimental) @NotNull public Connections getConnections()
getConnections in interface IConnectable@Stability(value=Experimental) @NotNull public String getServiceArn()
getServiceArn in interface IService@Stability(value=Experimental) @NotNull public String getServiceName()
getServiceName in interface IService@Stability(value=Experimental) @NotNull public TaskDefinition getTaskDefinition()
@Stability(value=Experimental) @Nullable public IService getCloudMapService()
@Stability(value=Experimental) @NotNull protected List<CfnService.LoadBalancerProperty> getLoadBalancers()
@Stability(value=Experimental)
protected void setLoadBalancers(@NotNull
List<CfnService.LoadBalancerProperty> value)
@Stability(value=Experimental) @NotNull protected List<CfnService.ServiceRegistryProperty> getServiceRegistries()
For more information, see Service Discovery.
@Stability(value=Experimental)
protected void setServiceRegistries(@NotNull
List<CfnService.ServiceRegistryProperty> value)
For more information, see Service Discovery.
@Stability(value=Experimental) @Nullable protected Service getCloudmapService()
@Stability(value=Experimental)
protected void setCloudmapService(@Nullable
Service value)
@Stability(value=Experimental) @Nullable protected CfnService.NetworkConfigurationProperty getNetworkConfiguration()
@Stability(value=Experimental)
protected void setNetworkConfiguration(@Nullable
CfnService.NetworkConfigurationProperty value)
Copyright © 2021. All rights reserved.