@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:43.535Z") public class CfnService extends CfnResource implements IInspectable
Specify an AWS App Runner service by using the AWS::AppRunner::Service
resource in an AWS CloudFormation template.
The AWS::AppRunner::Service
resource is an AWS App Runner resource type that specifies an App Runner service.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.apprunner.*; CfnService cfnService = CfnService.Builder.create(this, "MyCfnService") .sourceConfiguration(SourceConfigurationProperty.builder() .authenticationConfiguration(AuthenticationConfigurationProperty.builder() .accessRoleArn("accessRoleArn") .connectionArn("connectionArn") .build()) .autoDeploymentsEnabled(false) .codeRepository(CodeRepositoryProperty.builder() .repositoryUrl("repositoryUrl") .sourceCodeVersion(SourceCodeVersionProperty.builder() .type("type") .value("value") .build()) // the properties below are optional .codeConfiguration(CodeConfigurationProperty.builder() .configurationSource("configurationSource") // the properties below are optional .codeConfigurationValues(CodeConfigurationValuesProperty.builder() .runtime("runtime") // the properties below are optional .buildCommand("buildCommand") .port("port") .runtimeEnvironmentSecrets(List.of(KeyValuePairProperty.builder() .name("name") .value("value") .build())) .runtimeEnvironmentVariables(List.of(KeyValuePairProperty.builder() .name("name") .value("value") .build())) .startCommand("startCommand") .build()) .build()) .build()) .imageRepository(ImageRepositoryProperty.builder() .imageIdentifier("imageIdentifier") .imageRepositoryType("imageRepositoryType") // the properties below are optional .imageConfiguration(ImageConfigurationProperty.builder() .port("port") .runtimeEnvironmentSecrets(List.of(KeyValuePairProperty.builder() .name("name") .value("value") .build())) .runtimeEnvironmentVariables(List.of(KeyValuePairProperty.builder() .name("name") .value("value") .build())) .startCommand("startCommand") .build()) .build()) .build()) // the properties below are optional .autoScalingConfigurationArn("autoScalingConfigurationArn") .encryptionConfiguration(EncryptionConfigurationProperty.builder() .kmsKey("kmsKey") .build()) .healthCheckConfiguration(HealthCheckConfigurationProperty.builder() .healthyThreshold(123) .interval(123) .path("path") .protocol("protocol") .timeout(123) .unhealthyThreshold(123) .build()) .instanceConfiguration(InstanceConfigurationProperty.builder() .cpu("cpu") .instanceRoleArn("instanceRoleArn") .memory("memory") .build()) .networkConfiguration(NetworkConfigurationProperty.builder() .egressConfiguration(EgressConfigurationProperty.builder() .egressType("egressType") // the properties below are optional .vpcConnectorArn("vpcConnectorArn") .build()) .ingressConfiguration(IngressConfigurationProperty.builder() .isPubliclyAccessible(false) .build()) .build()) .observabilityConfiguration(ServiceObservabilityConfigurationProperty.builder() .observabilityEnabled(false) // the properties below are optional .observabilityConfigurationArn("observabilityConfigurationArn") .build()) .serviceName("serviceName") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnService.AuthenticationConfigurationProperty
Describes resources needed to authenticate access to some source repositories.
|
static class |
CfnService.Builder
A fluent builder for
CfnService . |
static interface |
CfnService.CodeConfigurationProperty
Describes the configuration that AWS App Runner uses to build and run an App Runner service from a source code repository.
|
static interface |
CfnService.CodeConfigurationValuesProperty
Describes the basic configuration needed for building and running an AWS App Runner service.
|
static interface |
CfnService.CodeRepositoryProperty
Describes a source code repository.
|
static interface |
CfnService.EgressConfigurationProperty
Describes configuration settings related to outbound network traffic of an AWS App Runner service.
|
static interface |
CfnService.EncryptionConfigurationProperty
Describes a custom encryption key that AWS App Runner uses to encrypt copies of the source repository and service logs.
|
static interface |
CfnService.HealthCheckConfigurationProperty
Describes the settings for the health check that AWS App Runner performs to monitor the health of a service.
|
static interface |
CfnService.ImageConfigurationProperty
Describes the configuration that AWS App Runner uses to run an App Runner service using an image pulled from a source image repository.
|
static interface |
CfnService.ImageRepositoryProperty
Describes a source image repository.
|
static interface |
CfnService.IngressConfigurationProperty
Network configuration settings for inbound network traffic.
|
static interface |
CfnService.InstanceConfigurationProperty
Describes the runtime configuration of an AWS App Runner service instance (scaling unit).
|
static interface |
CfnService.KeyValuePairProperty
Describes a key-value pair, which is a string-to-string mapping.
|
static interface |
CfnService.NetworkConfigurationProperty
Describes configuration settings related to network traffic of an AWS App Runner service.
|
static interface |
CfnService.ServiceObservabilityConfigurationProperty
Describes the observability configuration of an AWS App Runner service.
|
static interface |
CfnService.SourceCodeVersionProperty
Identifies a version of code that AWS App Runner refers to within a source code repository.
|
static interface |
CfnService.SourceConfigurationProperty
Describes the source deployed to an AWS App Runner service.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnService(Construct scope,
java.lang.String id,
CfnServiceProps props)
Create a new `AWS::AppRunner::Service`.
|
protected |
CfnService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnService(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrServiceArn()
The Amazon Resource Name (ARN) of this service.
|
java.lang.String |
getAttrServiceId()
An ID that App Runner generated for this service.
|
java.lang.String |
getAttrServiceUrl()
A subdomain URL that App Runner generated for this service.
|
java.lang.String |
getAttrStatus()
The current state of the App Runner service.
|
java.lang.String |
getAutoScalingConfigurationArn()
The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with your service.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getEncryptionConfiguration()
An optional custom encryption key that App Runner uses to encrypt the copy of your source repository that it maintains and your service logs.
|
java.lang.Object |
getHealthCheckConfiguration()
The settings for the health check that AWS App Runner performs to monitor the health of the App Runner service.
|
java.lang.Object |
getInstanceConfiguration()
The runtime configuration of instances (scaling units) of your service.
|
java.lang.Object |
getNetworkConfiguration()
Configuration settings related to network traffic of the web application that the App Runner service runs.
|
java.lang.Object |
getObservabilityConfiguration()
The observability configuration of your service.
|
java.lang.String |
getServiceName()
A name for the App Runner service.
|
java.lang.Object |
getSourceConfiguration()
The source to deploy to the App Runner service.
|
TagManager |
getTags()
An optional list of metadata items that you can associate with the App Runner service resource.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAutoScalingConfigurationArn(java.lang.String value)
The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with your service.
|
void |
setEncryptionConfiguration(CfnService.EncryptionConfigurationProperty value)
An optional custom encryption key that App Runner uses to encrypt the copy of your source repository that it maintains and your service logs.
|
void |
setEncryptionConfiguration(IResolvable value)
An optional custom encryption key that App Runner uses to encrypt the copy of your source repository that it maintains and your service logs.
|
void |
setHealthCheckConfiguration(CfnService.HealthCheckConfigurationProperty value)
The settings for the health check that AWS App Runner performs to monitor the health of the App Runner service.
|
void |
setHealthCheckConfiguration(IResolvable value)
The settings for the health check that AWS App Runner performs to monitor the health of the App Runner service.
|
void |
setInstanceConfiguration(CfnService.InstanceConfigurationProperty value)
The runtime configuration of instances (scaling units) of your service.
|
void |
setInstanceConfiguration(IResolvable value)
The runtime configuration of instances (scaling units) of your service.
|
void |
setNetworkConfiguration(CfnService.NetworkConfigurationProperty value)
Configuration settings related to network traffic of the web application that the App Runner service runs.
|
void |
setNetworkConfiguration(IResolvable value)
Configuration settings related to network traffic of the web application that the App Runner service runs.
|
void |
setObservabilityConfiguration(CfnService.ServiceObservabilityConfigurationProperty value)
The observability configuration of your service.
|
void |
setObservabilityConfiguration(IResolvable value)
The observability configuration of your service.
|
void |
setServiceName(java.lang.String value)
A name for the App Runner service.
|
void |
setSourceConfiguration(CfnService.SourceConfigurationProperty value)
The source to deploy to the App Runner service.
|
void |
setSourceConfiguration(IResolvable value)
The source to deploy to the App Runner service.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnService(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnService(Construct scope, java.lang.String id, CfnServiceProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrServiceArn()
public java.lang.String getAttrServiceId()
It's unique within the AWS Region .
public java.lang.String getAttrServiceUrl()
You can use this URL to access your service web application.
public java.lang.String getAttrStatus()
CREATE_FAILED
– The service failed to create. To troubleshoot this failure, read the failure events and logs, change any parameters that need to be fixed, and retry the call to create the service.The failed service isn't usable, and still counts towards your service quota. When you're done analyzing the failure, delete the service.
DELETE_FAILED
– The service failed to delete and can't be successfully recovered. Retry the service deletion call to ensure that all related resources are removed.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
A tag is a key-value pair.
public java.lang.Object getSourceConfiguration()
It can be a code or an image repository.
public void setSourceConfiguration(IResolvable value)
It can be a code or an image repository.
public void setSourceConfiguration(CfnService.SourceConfigurationProperty value)
It can be a code or an image repository.
public java.lang.String getAutoScalingConfigurationArn()
If not provided, App Runner associates the latest revision of a default auto scaling configuration.
Specify an ARN with a name and a revision number to associate that revision. For example: arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability/3
Specify just the name to associate the latest revision. For example: arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability
public void setAutoScalingConfigurationArn(java.lang.String value)
If not provided, App Runner associates the latest revision of a default auto scaling configuration.
Specify an ARN with a name and a revision number to associate that revision. For example: arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability/3
Specify just the name to associate the latest revision. For example: arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability
public java.lang.Object getEncryptionConfiguration()
By default, App Runner uses an AWS managed key .
public void setEncryptionConfiguration(IResolvable value)
By default, App Runner uses an AWS managed key .
public void setEncryptionConfiguration(CfnService.EncryptionConfigurationProperty value)
By default, App Runner uses an AWS managed key .
public java.lang.Object getHealthCheckConfiguration()
public void setHealthCheckConfiguration(IResolvable value)
public void setHealthCheckConfiguration(CfnService.HealthCheckConfigurationProperty value)
public java.lang.Object getInstanceConfiguration()
public void setInstanceConfiguration(IResolvable value)
public void setInstanceConfiguration(CfnService.InstanceConfigurationProperty value)
public java.lang.Object getNetworkConfiguration()
public void setNetworkConfiguration(IResolvable value)
public void setNetworkConfiguration(CfnService.NetworkConfigurationProperty value)
public java.lang.Object getObservabilityConfiguration()
public void setObservabilityConfiguration(IResolvable value)
public void setObservabilityConfiguration(CfnService.ServiceObservabilityConfigurationProperty value)
public java.lang.String getServiceName()
It must be unique across all the running App Runner services in your AWS account in the AWS Region .
If you don't specify a name, AWS CloudFormation generates a name for your service.
public void setServiceName(java.lang.String value)
It must be unique across all the running App Runner services in your AWS account in the AWS Region .
If you don't specify a name, AWS CloudFormation generates a name for your service.