CfnServer L1 construct
Instantiates an auto-scaling virtual server based on the selected file transfer protocol in AWS .
When you make updates to your file transfer protocol-enabled server or when you work with users, use the service-generated ServerId property that is assigned to the newly created server.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_transfer as transfer } from 'aws-cdk-lib';
const cfnServer = new transfer.CfnServer(this, 'MyCfnServer', /* all optional props */ {
certificate: 'certificate',
domain: 'domain',
endpointDetails: {
addressAllocationIds: ['addressAllocationIds'],
securityGroupIds: ['securityGroupIds'],
subnetIds: ['subnetIds'],
vpcEndpointId: 'vpcEndpointId',
vpcId: 'vpcId',
},
endpointType: 'endpointType',
identityProviderDetails: {
directoryId: 'directoryId',
function: 'function',
invocationRole: 'invocationRole',
sftpAuthenticationMethods: 'sftpAuthenticationMethods',
url: 'url',
},
identityProviderType: 'identityProviderType',
ipAddressType: 'ipAddressType',
loggingRole: 'loggingRole',
postAuthenticationLoginBanner: 'postAuthenticationLoginBanner',
preAuthenticationLoginBanner: 'preAuthenticationLoginBanner',
protocolDetails: {
as2Transports: ['as2Transports'],
passiveIp: 'passiveIp',
proxyConfig: {
sftpMode: 'sftpMode',
},
setStatOption: 'setStatOption',
tlsSessionResumptionMode: 'tlsSessionResumptionMode',
},
protocols: ['protocols'],
s3StorageOptions: {
directoryListingOptimization: 'directoryListingOptimization',
},
securityPolicyName: 'securityPolicyName',
structuredLogDestinations: ['structuredLogDestinations'],
tags: [{
key: 'key',
value: 'value',
}],
workflowDetails: {
onPartialUpload: [{
executionRole: 'executionRole',
workflowId: 'workflowId',
}],
onUpload: [{
executionRole: 'executionRole',
workflowId: 'workflowId',
}],
},
});
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_transfer as transfer
cfn_server = transfer.CfnServer(self, "MyCfnServer",
certificate="certificate",
domain="domain",
endpoint_details=transfer.CfnServer.EndpointDetailsProperty(
address_allocation_ids=["addressAllocationIds"],
security_group_ids=["securityGroupIds"],
subnet_ids=["subnetIds"],
vpc_endpoint_id="vpcEndpointId",
vpc_id="vpcId"
),
endpoint_type="endpointType",
identity_provider_details=transfer.CfnServer.IdentityProviderDetailsProperty(
directory_id="directoryId",
function="function",
invocation_role="invocationRole",
sftp_authentication_methods="sftpAuthenticationMethods",
url="url"
),
identity_provider_type="identityProviderType",
ip_address_type="ipAddressType",
logging_role="loggingRole",
post_authentication_login_banner="postAuthenticationLoginBanner",
pre_authentication_login_banner="preAuthenticationLoginBanner",
protocol_details=transfer.CfnServer.ProtocolDetailsProperty(
as2_transports=["as2Transports"],
passive_ip="passiveIp",
proxy_config=transfer.CfnServer.ProxyConfigProperty(
sftp_mode="sftpMode"
),
set_stat_option="setStatOption",
tls_session_resumption_mode="tlsSessionResumptionMode"
),
protocols=["protocols"],
s3_storage_options=transfer.CfnServer.S3StorageOptionsProperty(
directory_listing_optimization="directoryListingOptimization"
),
security_policy_name="securityPolicyName",
structured_log_destinations=["structuredLogDestinations"],
tags=[CfnTag(
key="key",
value="value"
)],
workflow_details=transfer.CfnServer.WorkflowDetailsProperty(
on_partial_upload=[transfer.CfnServer.WorkflowDetailProperty(
execution_role="executionRole",
workflow_id="workflowId"
)],
on_upload=[transfer.CfnServer.WorkflowDetailProperty(
execution_role="executionRole",
workflow_id="workflowId"
)]
)
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.transfer.*;
CfnServer cfnServer = CfnServer.Builder.create(this, "MyCfnServer")
.certificate("certificate")
.domain("domain")
.endpointDetails(EndpointDetailsProperty.builder()
.addressAllocationIds(List.of("addressAllocationIds"))
.securityGroupIds(List.of("securityGroupIds"))
.subnetIds(List.of("subnetIds"))
.vpcEndpointId("vpcEndpointId")
.vpcId("vpcId")
.build())
.endpointType("endpointType")
.identityProviderDetails(IdentityProviderDetailsProperty.builder()
.directoryId("directoryId")
.function("function")
.invocationRole("invocationRole")
.sftpAuthenticationMethods("sftpAuthenticationMethods")
.url("url")
.build())
.identityProviderType("identityProviderType")
.ipAddressType("ipAddressType")
.loggingRole("loggingRole")
.postAuthenticationLoginBanner("postAuthenticationLoginBanner")
.preAuthenticationLoginBanner("preAuthenticationLoginBanner")
.protocolDetails(ProtocolDetailsProperty.builder()
.as2Transports(List.of("as2Transports"))
.passiveIp("passiveIp")
.proxyConfig(ProxyConfigProperty.builder()
.sftpMode("sftpMode")
.build())
.setStatOption("setStatOption")
.tlsSessionResumptionMode("tlsSessionResumptionMode")
.build())
.protocols(List.of("protocols"))
.s3StorageOptions(S3StorageOptionsProperty.builder()
.directoryListingOptimization("directoryListingOptimization")
.build())
.securityPolicyName("securityPolicyName")
.structuredLogDestinations(List.of("structuredLogDestinations"))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.workflowDetails(WorkflowDetailsProperty.builder()
.onPartialUpload(List.of(WorkflowDetailProperty.builder()
.executionRole("executionRole")
.workflowId("workflowId")
.build()))
.onUpload(List.of(WorkflowDetailProperty.builder()
.executionRole("executionRole")
.workflowId("workflowId")
.build()))
.build())
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Transfer;
var cfnServer = new CfnServer(this, "MyCfnServer", new CfnServerProps {
Certificate = "certificate",
Domain = "domain",
EndpointDetails = new EndpointDetailsProperty {
AddressAllocationIds = new [] { "addressAllocationIds" },
SecurityGroupIds = new [] { "securityGroupIds" },
SubnetIds = new [] { "subnetIds" },
VpcEndpointId = "vpcEndpointId",
VpcId = "vpcId"
},
EndpointType = "endpointType",
IdentityProviderDetails = new IdentityProviderDetailsProperty {
DirectoryId = "directoryId",
Function = "function",
InvocationRole = "invocationRole",
SftpAuthenticationMethods = "sftpAuthenticationMethods",
Url = "url"
},
IdentityProviderType = "identityProviderType",
IpAddressType = "ipAddressType",
LoggingRole = "loggingRole",
PostAuthenticationLoginBanner = "postAuthenticationLoginBanner",
PreAuthenticationLoginBanner = "preAuthenticationLoginBanner",
ProtocolDetails = new ProtocolDetailsProperty {
As2Transports = new [] { "as2Transports" },
PassiveIp = "passiveIp",
ProxyConfig = new ProxyConfigProperty {
SftpMode = "sftpMode"
},
SetStatOption = "setStatOption",
TlsSessionResumptionMode = "tlsSessionResumptionMode"
},
Protocols = new [] { "protocols" },
S3StorageOptions = new S3StorageOptionsProperty {
DirectoryListingOptimization = "directoryListingOptimization"
},
SecurityPolicyName = "securityPolicyName",
StructuredLogDestinations = new [] { "structuredLogDestinations" },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
WorkflowDetails = new WorkflowDetailsProperty {
OnPartialUpload = new [] { new WorkflowDetailProperty {
ExecutionRole = "executionRole",
WorkflowId = "workflowId"
} },
OnUpload = new [] { new WorkflowDetailProperty {
ExecutionRole = "executionRole",
WorkflowId = "workflowId"
} }
}
});
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnServer := awscdk.Aws_transfer.NewCfnServer(this, jsii.String("MyCfnServer"), &CfnServerProps{
Certificate: jsii.String("certificate"),
Domain: jsii.String("domain"),
EndpointDetails: &EndpointDetailsProperty{
AddressAllocationIds: []*string{
jsii.String("addressAllocationIds"),
},
SecurityGroupIds: []*string{
jsii.String("securityGroupIds"),
},
SubnetIds: []*string{
jsii.String("subnetIds"),
},
VpcEndpointId: jsii.String("vpcEndpointId"),
VpcId: jsii.String("vpcId"),
},
EndpointType: jsii.String("endpointType"),
IdentityProviderDetails: &IdentityProviderDetailsProperty{
DirectoryId: jsii.String("directoryId"),
Function: jsii.String("function"),
InvocationRole: jsii.String("invocationRole"),
SftpAuthenticationMethods: jsii.String("sftpAuthenticationMethods"),
Url: jsii.String("url"),
},
IdentityProviderType: jsii.String("identityProviderType"),
IpAddressType: jsii.String("ipAddressType"),
LoggingRole: jsii.String("loggingRole"),
PostAuthenticationLoginBanner: jsii.String("postAuthenticationLoginBanner"),
PreAuthenticationLoginBanner: jsii.String("preAuthenticationLoginBanner"),
ProtocolDetails: &ProtocolDetailsProperty{
As2Transports: []*string{
jsii.String("as2Transports"),
},
PassiveIp: jsii.String("passiveIp"),
ProxyConfig: &ProxyConfigProperty{
SftpMode: jsii.String("sftpMode"),
},
SetStatOption: jsii.String("setStatOption"),
TlsSessionResumptionMode: jsii.String("tlsSessionResumptionMode"),
},
Protocols: []*string{
jsii.String("protocols"),
},
S3StorageOptions: &S3StorageOptionsProperty{
DirectoryListingOptimization: jsii.String("directoryListingOptimization"),
},
SecurityPolicyName: jsii.String("securityPolicyName"),
StructuredLogDestinations: []*string{
jsii.String("structuredLogDestinations"),
},
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
WorkflowDetails: &WorkflowDetailsProperty{
OnPartialUpload: []interface{}{
&WorkflowDetailProperty{
ExecutionRole: jsii.String("executionRole"),
WorkflowId: jsii.String("workflowId"),
},
},
OnUpload: []interface{}{
&WorkflowDetailProperty{
ExecutionRole: jsii.String("executionRole"),
WorkflowId: jsii.String("workflowId"),
},
},
},
})
Initializer
new CfnServer(scope: Construct, id: string, props?: CfnServerProps)
CfnServer(scope: Construct, id: str, props: typing.Optional[CfnServerProps] = None)
new CfnServer(Construct scope, String id, CfnServerProps props)
new CfnServer(Construct scope, string id, CfnServerProps? props = null)
NewCfnServer(Scope Construct, Id *string, Props CfnServerProps)
Construct Props
notes
To request a new public certificate, see Request a public certificate in the Certificate Manager User Guide .
To import an existing certificate into ACM, see Importing certificates into ACM in the Certificate Manager User Guide .
To request a private certificate to use FTPS through private IP addresses, see Request a private certificate in the Certificate Manager User Guide .
Certificates with the following cryptographic algorithms and key sizes are supported:
- 2048-bit RSA (RSA_2048)
- 4096-bit RSA (RSA_4096)
- Elliptic Prime Curve 256 bit (EC_prime256v1)
- Elliptic Prime Curve 384 bit (EC_secp384r1)
- Elliptic Prime Curve 521 bit (EC_secp521r1)
The certificate must be a valid SSL/TLS X.509 version 3 certificate with FQDN or IP address specified and information about the issuer.
There are two domains available: Amazon Simple Storage Service (Amazon S3) and Amazon Elastic File System (Amazon EFS). The default value is S3.
endpointDetailsIResolvable | CfnServer.EndpointDetailsPropertyendpoint_detailstyping.Union[IResolvable, EndpointDetailsProperty]endpointDetailsIResolvableEndpointDetailsIResolvableEndpointDetailsinterface{}#notes
When you host your endpoint within your VPC, you can make your endpoint accessible only to resources within your VPC, or you can attach Elastic IP addresses and make your endpoint accessible to clients over the internet. Your VPC's default security groups are automatically assigned to your endpoint.
notes
You can choose to make your server's endpoint publicly accessible (PUBLIC) or host it inside your VPC. With an endpoint that is hosted in a VPC, you can restrict access to your server and resources only within your VPC or choose to make it internet facing by attaching Elastic IP addresses directly to it.
After May 19, 2021, you won't be able to create a server using
EndpointType=VPC_ENDPOINTin your AWS account if your account hasn't already done so before May 19, 2021. If you have already created servers withEndpointType=VPC_ENDPOINTin your AWS account on or before May 19, 2021, you will not be affected. After this date, useEndpointType=VPC.For more information, see Discontinuing the use of VPC_ENDPOINT .
It is recommended that you use
VPCas theEndpointType. With this endpoint type, you have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) with your server's endpoint and use VPC security groups to restrict traffic by the client's public IP address. This is not possible withEndpointTypeset toVPC_ENDPOINT.
identityProviderDetailsIResolvable | CfnServer.IdentityProviderDetailsPropertyidentity_provider_detailstyping.Union[IResolvable, IdentityProviderDetailsProperty]identityProviderDetailsIResolvableIdentityProviderDetailsIResolvableIdentityProviderDetailsinterface{}#notes
Accepts an array containing all of the information required to use a directory in AWS_DIRECTORY_SERVICE or invoke a customer-supplied authentication API, including the API Gateway URL. Cannot be specified when IdentityProviderType is set to SERVICE_MANAGED .
identityProviderTypestringidentity_provider_typestridentityProviderTypeStringIdentityProviderTypestringIdentityProviderType*string#notes
The default value is SERVICE_MANAGED , which allows you to store and access user credentials within the AWS Transfer Family service.
Use AWS_DIRECTORY_SERVICE to provide access to Active Directory groups in AWS Directory Service for Microsoft Active Directory or Microsoft Active Directory in your on-premises environment or in AWS using AD Connector. This option also requires you to provide a Directory ID by using the IdentityProviderDetails parameter.
Use the API_GATEWAY value to integrate with an identity provider of your choosing. The API_GATEWAY setting requires you to provide an Amazon API Gateway endpoint URL to call for authentication by using the IdentityProviderDetails parameter.
Use the AWS_LAMBDA value to directly use an AWS Lambda function as your identity provider. If you choose this value, you must specify the ARN for the Lambda function in the Function parameter for the IdentityProviderDetails data type.
notes
The default value is IPV4 .
The
IpAddressTypeparameter has the following limitations:
- It cannot be changed while the server is online. You must stop the server before modifying this parameter.
- It cannot be updated to
DUALSTACKif the server hasAddressAllocationIdsspecified. > When usingDUALSTACKas theIpAddressType, you cannot set theAddressAllocationIdsparameter for the EndpointDetails for the server.
When set, you can view user activity in your CloudWatch logs.
postAuthenticationLoginBannerstringpost_authentication_login_bannerstrpostAuthenticationLoginBannerStringPostAuthenticationLoginBannerstringPostAuthenticationLoginBanner*string#The SFTP protocol does not support post-authentication display banners.
preAuthenticationLoginBannerstringpre_authentication_login_bannerstrpreAuthenticationLoginBannerStringPreAuthenticationLoginBannerstringPreAuthenticationLoginBanner*string#notes
This string is displayed before the user authenticates. For example, the following banner displays details about using the system:
This system is for the use of authorized users only. Individuals using this computer system without authority, or in excess of their authority, are subject to having all of their activities on this system monitored and recorded by system personnel.
protocolDetailsIResolvable | CfnServer.ProtocolDetailsPropertyprotocol_detailstyping.Union[IResolvable, ProtocolDetailsProperty]protocolDetailsIResolvableProtocolDetailsIResolvableProtocolDetailsinterface{}#notes
- To indicate passive mode (for FTP and FTPS protocols), use the
PassiveIpparameter. Enter a single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer. - To ignore the error that is generated when the client attempts to use the
SETSTATcommand on a file that you are uploading to an Amazon S3 bucket, use theSetStatOptionparameter. To have the AWS Transfer Family server ignore theSETSTATcommand and upload files without needing to make any changes to your SFTP client, set the value toENABLE_NO_OP. If you set theSetStatOptionparameter toENABLE_NO_OP, Transfer Family generates a log entry to Amazon CloudWatch Logs, so that you can determine when the client is making aSETSTATcall. - To determine whether your AWS Transfer Family server resumes recent, negotiated sessions through a unique session ID, use the
TlsSessionResumptionModeparameter. As2Transportsindicates the transport method for the AS2 messages. Currently, only HTTP is supported.
The Protocols parameter is an array of strings.
Allowed values : One or more of SFTP , FTPS , FTP , AS2
protocolsstring[]protocolstyping.List[str]protocolsList<String>Protocolsstring[]Protocols*[]*string#notes
The available protocols are:
SFTP(Secure Shell (SSH) File Transfer Protocol): File transfer over SSHFTPS(File Transfer Protocol Secure): File transfer with TLS encryptionFTP(File Transfer Protocol): Unencrypted file transferAS2(Applicability Statement 2): used for transporting structured business-to-business data
- If you select
FTPS, you must choose a certificate stored in Certificate Manager (ACM) which is used to identify your server when clients connect to it over FTPS.- If
Protocolincludes eitherFTPorFTPS, then theEndpointTypemust beVPCand theIdentityProviderTypemust be eitherAWS_DIRECTORY_SERVICE,AWS_LAMBDA, orAPI_GATEWAY.- If
ProtocolincludesFTP, thenAddressAllocationIdscannot be associated.- If
Protocolis set only toSFTP, theEndpointTypecan be set toPUBLICand theIdentityProviderTypecan be set any of the supported identity types:SERVICE_MANAGED,AWS_DIRECTORY_SERVICE,AWS_LAMBDA, orAPI_GATEWAY.- If
ProtocolincludesAS2, then theEndpointTypemust beVPC, and domain must be Amazon S3.
The Protocols parameter is an array of strings.
Allowed values : One or more of SFTP , FTPS , FTP , AS2
s3StorageOptionsIResolvable | CfnServer.S3StorageOptionsPropertys3_storage_optionstyping.Union[IResolvable, S3StorageOptionsProperty]s3StorageOptionsIResolvableS3StorageOptionsIResolvableS3StorageOptionsinterface{}#notes
- If using the console, this is enabled by default.
- If using the API or CLI, this is disabled by default.
By default, home directory mappings have a TYPE of DIRECTORY . If you enable this option, you would then need to explicitly set the HomeDirectoryMapEntry Type to FILE if you want a mapping to have a file target.
securityPolicyNamestringsecurity_policy_namestrsecurityPolicyNameStringSecurityPolicyNamestringSecurityPolicyName*string#structuredLogDestinationsstring[]structured_log_destinationstyping.List[str]structuredLogDestinationsList<String>StructuredLogDestinationsstring[]StructuredLogDestinations*[]*string#notes
To specify a log group, you must provide the ARN for an existing log group. In this case, the format of the log group is as follows:
arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*
For example, arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*
If you have previously specified a log group for a server, you can clear it, and in effect turn off structured logging, by providing an empty value for this parameter in an update-server call. For example:
update-server --server-id s-1234567890abcdef0 --structured-log-destinations
workflowDetailsIResolvable | CfnServer.WorkflowDetailsPropertyworkflow_detailstyping.Union[IResolvable, WorkflowDetailsProperty]workflowDetailsIResolvableWorkflowDetailsIResolvableWorkflowDetailsinterface{}#notes
In addition to a workflow to execute when a file is uploaded completely, WorkflowDetails can also contain a workflow ID (and execution role) for a workflow to execute on partial upload. A partial upload occurs when a file is open when the session disconnects.
Properties
attrAs2ServiceManagedEgressIpAddressesstring[]attr_as2_service_managed_egress_ip_addressestyping.List[str]attrAs2ServiceManagedEgressIpAddressesList<String>AttrAs2ServiceManagedEgressIpAddressesstring[]AttrAs2ServiceManagedEgressIpAddresses*[]*stringrequired#notes
These IP addresses are only relevant for servers that use the AS2 protocol. They are used for sending asynchronous MDNs.
These IP addresses are assigned automatically when you create an AS2 server. Additionally, if you update an existing server and add the AS2 protocol, static IP addresses are assigned as well.
notes
A value of ONLINE indicates that the server can accept jobs and transfer files. A State value of OFFLINE means that the server cannot perform file transfer operations.
The states of STARTING and STOPPING indicate that the server is in an intermediate state, either not fully able to respond, or not fully offline. The values of START_FAILED or STOP_FAILED can indicate an error condition.
Required when Protocols is set to FTPS .
CFN_RESOURCE_TYPE_NAMEstringcfn_resource_type_namestrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*stringrequiredstatic#cfnOptionsICfnResourceOptionscfn_optionsICfnResourceOptionscfnOptionsICfnResourceOptionsCfnOptionsICfnResourceOptionsCfnOptionsICfnResourceOptionsrequired#cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*stringrequired#creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*stringrequired#endpointDetailsIResolvable | CfnServer.EndpointDetailsPropertyendpoint_detailstyping.Union[IResolvable, EndpointDetailsProperty]endpointDetailsIResolvableEndpointDetailsIResolvableEndpointDetailsinterface{}#identityProviderDetailsIResolvable | CfnServer.IdentityProviderDetailsPropertyidentity_provider_detailstyping.Union[IResolvable, IdentityProviderDetailsProperty]identityProviderDetailsIResolvableIdentityProviderDetailsIResolvableIdentityProviderDetailsinterface{}#identityProviderTypestringidentity_provider_typestridentityProviderTypeStringIdentityProviderTypestringIdentityProviderType*string#The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use overrideLogicalId(newLogicalId).
postAuthenticationLoginBannerstringpost_authentication_login_bannerstrpostAuthenticationLoginBannerStringPostAuthenticationLoginBannerstringPostAuthenticationLoginBanner*string#This string is displayed after the user authenticates.
preAuthenticationLoginBannerstringpre_authentication_login_bannerstrpreAuthenticationLoginBannerStringPreAuthenticationLoginBannerstringPreAuthenticationLoginBanner*string#protocolDetailsIResolvable | CfnServer.ProtocolDetailsPropertyprotocol_detailstyping.Union[IResolvable, ProtocolDetailsProperty]protocolDetailsIResolvableProtocolDetailsIResolvableProtocolDetailsinterface{}#protocolsstring[]protocolstyping.List[str]protocolsList<String>Protocolsstring[]Protocols*[]*string#If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).
s3StorageOptionsIResolvable | CfnServer.S3StorageOptionsPropertys3_storage_optionstyping.Union[IResolvable, S3StorageOptionsProperty]s3StorageOptionsIResolvableS3StorageOptionsIResolvableS3StorageOptionsinterface{}#securityPolicyNamestringsecurity_policy_namestrsecurityPolicyNameStringSecurityPolicyNamestringSecurityPolicyName*string#serverRefServerReferenceserver_refServerReferenceserverRefServerReferenceServerRefServerReferenceServerRefServerReferencerequired#CfnElements must be defined within a stack scope (directly or indirectly).
structuredLogDestinationsstring[]structured_log_destinationstyping.List[str]structuredLogDestinationsList<String>StructuredLogDestinationsstring[]StructuredLogDestinations*[]*string#workflowDetailsIResolvable | CfnServer.WorkflowDetailsPropertyworkflow_detailstyping.Union[IResolvable, WorkflowDetailsProperty]workflowDetailsIResolvableWorkflowDetailsIResolvableWorkflowDetailsinterface{}#Methods
addDeletionOverride(path: string): voiddef add_deletion_override(self, path: str) -> Nonepublic void addDeletionOverride(String path)public void AddDeletionOverride(string path)func AddDeletionOverride(Path *string)#1 parameter
Parameters
pathpathpathpathPath— The path of the value to delete.
addDependency(target: CfnResource): voiddef add_dependency(self, target: CfnResource) -> Nonepublic void addDependency(CfnResource target)public void AddDependency(CfnResource target)func AddDependency(Target CfnResource)deprecated#This method has been renamed to addResourceDependency to more clearly set it apart from construct.node.addDependency. See the documentation of that function for more details.
addDependsOn(target: CfnResource): voiddef add_depends_on(self, target: CfnResource) -> Nonepublic void addDependsOn(CfnResource target)public void AddDependsOn(CfnResource target)func AddDependsOn(Target CfnResource)deprecated#notes
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
This method has been renamed to addResourceDependency, which makes it more clear that this method operates at a different level from the construct-level construct.node.addDependency() mechanism.
addMetadata(key: string, value: any): voiddef add_metadata(self, key: str, value: Any) -> Nonepublic void addMetadata(String key, Object value)public void AddMetadata(string key, object value)func AddMetadata(Key *string, Value interface{})#addOverride(path: string, value: any): voiddef add_override(self, path: str, value: Any) -> Nonepublic void addOverride(String path, Object value)public void AddOverride(string path, object value)func AddOverride(Path *string, Value interface{})#notes · 2 parameters
To add a property override, either use addPropertyOverride or prefix path with "Properties." (i.e. Properties.TopicName).
If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.
For example,
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
would add the overrides
"Properties": {
"GlobalSecondaryIndexes": [
{
"Projection": {
"NonKeyAttributes": [ "myattribute" ]
...
}
...
},
{
"ProjectionType": "INCLUDE"
...
},
]
...
}
The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.
Parameters
pathpathpathpathPath— - The path of the property, you can use dot notation to override values in complex types.valuevaluevaluevalueValue— - The value.
addPropertyDeletionOverride(propertyPath: string): voiddef add_property_deletion_override(self, property_path: str) -> Nonepublic void addPropertyDeletionOverride(String propertyPath)public void AddPropertyDeletionOverride(string propertyPath)func AddPropertyDeletionOverride(PropertyPath *string)#1 parameter
Parameters
propertyPathproperty_pathpropertyPathpropertyPathPropertyPath— The path to the property.
addPropertyOverride(propertyPath: string, value: any): voiddef add_property_override(self, property_path: str, value: Any) -> Nonepublic void addPropertyOverride(String propertyPath, Object value)public void AddPropertyOverride(string propertyPath, object value)func AddPropertyOverride(PropertyPath *string, Value interface{})#Syntactic sugar for addOverride("Properties.<...>", value).
2 parameters
Parameters
propertyPathproperty_pathpropertyPathpropertyPathPropertyPath— The path of the property.valuevaluevaluevalueValue— The value.
addResourceDependency(target: CfnResource, reason?: string): voiddef add_resource_dependency(self, target: CfnResource, reason: typing.Optional[str] = None) -> Nonepublic void addResourceDependency(CfnResource target, String reason)public void AddResourceDependency(CfnResource target, string? reason = null)func AddResourceDependency(Target CfnResource, Reason *string)#notes
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
This method only adds dependencies between L1 resources. If you are looking for a generic construct-to-construct dependency mechanism that works for all constructs including L2s, use construct.node.addDependency instead.
applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength)#When set, any cross-stack reference to this resource will use the specified strength instead of the global default from the consuming stack's context.
1 parameter
Parameters
strengthstrengthstrengthstrengthStrength— - The reference strength to use for this resource.
applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): voiddef apply_removal_policy(self, policy: typing.Optional[RemovalPolicy] = None, options: typing.Optional[RemovalPolicyOptions] = None) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy, RemovalPolicyOptions options)public void ApplyRemovalPolicy(RemovalPolicy? policy = null, RemovalPolicyOptions? options = null)func ApplyRemovalPolicy(Policy RemovalPolicy, Options RemovalPolicyOptions)#notes
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:
arnForServer(resource: IServerRef): string@staticmethod def arn_for_server(resource: IServerRef) -> strpublic static String arnForServer(IServerRef resource)public static string ArnForServer(IServerRef resource)func ArnForServer(Resource IServerRef) *stringstatic#cfnPropertyName(cdkPropertyName: string): stringdef cfn_property_name(self, cdk_property_name: str) -> strpublic String cfnPropertyName(String cdkPropertyName)public string CfnPropertyName(string cdkPropertyName)func CfnPropertyName(CdkPropertyName *string) *string#getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Referencedef get_att(self, attribute_name: str, type_hint: typing.Optional[ResolutionTypeHint] = None) -> Referencepublic Reference getAtt(String attributeName, ResolutionTypeHint typeHint)public Reference GetAtt(string attributeName, ResolutionTypeHint? typeHint = null)func GetAtt(AttributeName *string, TypeHint ResolutionTypeHint) Reference#Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.
1 parameter
Parameters
attributeNameattribute_nameattributeNameattributeNameAttributeName— The name of the attribute.
getMetadata(key: string): anydef get_metadata(self, key: str) -> Anypublic Object getMetadata(String key)public object GetMetadata(string key)func GetMetadata(Key *string) interface{}#inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector)#1 parameter
Parameters
inspectorinspectorinspectorinspectorInspector— tree inspector to collect and process attributes.
isCfnElement(x: any): boolean@staticmethod def is_cfn_element(x: Any) -> boolpublic static Boolean isCfnElement(Object x)public static bool IsCfnElement(object x)func IsCfnElement(X interface{}) *boolstatic#Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.
returns
Returns: The construct as a stack element or undefined if it is not a stack element.
isCfnResource(x: any): boolean@staticmethod def is_cfn_resource(x: Any) -> boolpublic static Boolean isCfnResource(Object x)public static bool IsCfnResource(object x)func IsCfnResource(X interface{}) *boolstatic#isCfnServer(x: any): boolean@staticmethod def is_cfn_server(x: Any) -> boolpublic static Boolean isCfnServer(Object x)public static bool IsCfnServer(object x)func IsCfnServer(X interface{}) *boolstatic#isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#notes · 1 parameter · returns
Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.
Parameters
xxxxX— Any object.
Returns: true if x is an object created from a class which extends Construct.
obtainDependencies(): Stack | CfnResource[]def obtain_dependencies(self, ) -> typing.List[typing.Union[Stack, CfnResource]]public List<Stack> obtainDependencies()public Stack[] ObtainDependencies()func ObtainDependencies() *[]interface{}#For resources depended on directly, returns the CfnResource object. For dependencies on other stacks, returns the Stack object. The order of the array is not guaranteed.
overrideLogicalId(newLogicalId: string): voiddef override_logical_id(self, new_logical_id: str) -> Nonepublic void overrideLogicalId(String newLogicalId)public void OverrideLogicalId(string newLogicalId)func OverrideLogicalId(NewLogicalId *string)#1 parameter
Parameters
newLogicalIdnew_logical_idnewLogicalIdnewLogicalIdNewLogicalId— The new logical ID to use for this stack element.
removeDependency(target: CfnResource): voiddef remove_dependency(self, target: CfnResource) -> Nonepublic void removeDependency(CfnResource target)public void RemoveDependency(CfnResource target)func RemoveDependency(Target CfnResource)deprecated#This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
removeResourceDependency(target: CfnResource): voiddef remove_resource_dependency(self, target: CfnResource) -> Nonepublic void removeResourceDependency(CfnResource target)public void RemoveResourceDependency(CfnResource target)func RemoveResourceDependency(Target CfnResource)#This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
replaceDependency(target: CfnResource, newTarget: CfnResource): voiddef replace_dependency(self, target: CfnResource, new_target: CfnResource) -> Nonepublic void replaceDependency(CfnResource target, CfnResource newTarget)public void ReplaceDependency(CfnResource target, CfnResource newTarget)func ReplaceDependency(Target CfnResource, NewTarget CfnResource)#2 parameters
Parameters
targettargettargettargetTarget— The dependency to replace.newTargetnew_targetnewTargetnewTargetNewTarget— The new dependency to add.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#returns
Returns: a string representation of this resource
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.