Class CfnServer
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.opsworkscm.CfnServer
- All Implemented Interfaces:
IInspectable,ITaggable,IServerRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:42.958Z")
@Stability(Stable)
public class CfnServer
extends CfnResource
implements IInspectable, IServerRef, ITaggable
The
AWS::OpsWorksCM::Server resource creates an AWS OpsWorks for Chef Automate or OpsWorks for Puppet Enterprise configuration management server.
For more information, see Create a Chef Automate Server in AWS CloudFormation or Create a Puppet Enterprise Master in AWS CloudFormation in the OpsWorks User Guide , and CreateServer in the AWS OpsWorks CM API Reference .
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.opsworkscm.*;
CfnServer cfnServer = CfnServer.Builder.create(this, "MyCfnServer")
.instanceProfileArn("instanceProfileArn")
.instanceType("instanceType")
.serviceRoleArn("serviceRoleArn")
// the properties below are optional
.associatePublicIpAddress(false)
.backupId("backupId")
.backupRetentionCount(123)
.customCertificate("customCertificate")
.customDomain("customDomain")
.customPrivateKey("customPrivateKey")
.disableAutomatedBackup(false)
.engine("engine")
.engineAttributes(List.of(EngineAttributeProperty.builder()
.name("name")
.value("value")
.build()))
.engineModel("engineModel")
.engineVersion("engineVersion")
.keyPair("keyPair")
.preferredBackupWindow("preferredBackupWindow")
.preferredMaintenanceWindow("preferredMaintenanceWindow")
.securityGroupIds(List.of("securityGroupIds"))
.subnetIds(List.of("subnetIds"))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnServer.static interfaceTheEngineAttributeproperty type specifies administrator credentials for an AWS OpsWorks for Chef Automate or OpsWorks for Puppet Enterprise server.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.opsworkscm.IServerRef
IServerRef.Jsii$Default, IServerRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnServer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnServer(software.amazon.jsii.JsiiObjectRef objRef) CfnServer(software.constructs.Construct scope, String id, CfnServerProps props) -
Method Summary
Modifier and TypeMethodDescriptionAssociate a public IP address with a server that you are launching.The Amazon Resource Name (ARN) of the server, such asarn:aws:OpsWorksCM:us-east-1:123456789012:server/server-a1bzhi.A DNS name that can be used to access the engine.If you specify this field, AWS OpsWorks CM creates the server by using the backup represented by BackupId.The number of automated backups that you want to keep.Supported on servers running Chef Automate 2.0 only.Supported on servers running Chef Automate 2.0 only.Supported on servers running Chef Automate 2.0 only.Enable or disable scheduled backups.The configuration management engine to use.Optional engine attributes on a specified server.The engine model of the server.The major release version of the engine that you want to use.The ARN of the instance profile that your Amazon EC2 instances use.The Amazon EC2 instance type to use.The Amazon EC2 key pair to set for the instance.The start time for a one-hour period during which AWS OpsWorks CM backs up application-level data on your server if automated backups are enabled.The start time for a one-hour period each week during which AWS OpsWorks CM performs maintenance on the instance.A list of security group IDs to attach to the Amazon EC2 instance.A reference to a Server resource.The service role that the AWS OpsWorks CM service backend uses to work with your account.The IDs of subnets in which to launch the server EC2 instance.getTags()Tag Manager which manages the tags for this resource.A map that contains tag keys and tag values to attach to an AWS OpsWorks for Chef Automate or OpsWorks for Puppet Enterprise server.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidAssociate a public IP address with a server that you are launching.voidAssociate a public IP address with a server that you are launching.voidsetBackupId(String value) If you specify this field, AWS OpsWorks CM creates the server by using the backup represented by BackupId.voidsetBackupRetentionCount(Number value) The number of automated backups that you want to keep.voidsetCustomCertificate(String value) Supported on servers running Chef Automate 2.0 only.voidsetCustomDomain(String value) Supported on servers running Chef Automate 2.0 only.voidsetCustomPrivateKey(String value) Supported on servers running Chef Automate 2.0 only.voidsetDisableAutomatedBackup(Boolean value) Enable or disable scheduled backups.voidEnable or disable scheduled backups.voidThe configuration management engine to use.voidsetEngineAttributes(List<Object> value) Optional engine attributes on a specified server.voidsetEngineAttributes(IResolvable value) Optional engine attributes on a specified server.voidsetEngineModel(String value) The engine model of the server.voidsetEngineVersion(String value) The major release version of the engine that you want to use.voidsetInstanceProfileArn(String value) The ARN of the instance profile that your Amazon EC2 instances use.voidsetInstanceType(String value) The Amazon EC2 instance type to use.voidsetKeyPair(String value) The Amazon EC2 key pair to set for the instance.voidsetPreferredBackupWindow(String value) The start time for a one-hour period during which AWS OpsWorks CM backs up application-level data on your server if automated backups are enabled.voidThe start time for a one-hour period each week during which AWS OpsWorks CM performs maintenance on the instance.voidsetSecurityGroupIds(List<String> value) A list of security group IDs to attach to the Amazon EC2 instance.voidsetServiceRoleArn(String value) The service role that the AWS OpsWorks CM service backend uses to work with your account.voidsetSubnetIds(List<String> value) The IDs of subnets in which to launch the server EC2 instance.voidsetTagsRaw(List<CfnTag> value) A map that contains tag keys and tag values to attach to an AWS OpsWorks for Chef Automate or OpsWorks for Puppet Enterprise server.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnServer
protected CfnServer(software.amazon.jsii.JsiiObjectRef objRef) -
CfnServer
protected CfnServer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnServer
@Stability(Stable) public CfnServer(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnServerProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the server, such asarn:aws:OpsWorksCM:us-east-1:123456789012:server/server-a1bzhi. -
getAttrEndpoint
A DNS name that can be used to access the engine.Example:
myserver-asdfghjkl.us-east-1.opsworks.io. -
getAttrServerName
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getServerRef
A reference to a Server resource.- Specified by:
getServerRefin interfaceIServerRef
-
getTags
Tag Manager which manages the tags for this resource. -
getInstanceProfileArn
The ARN of the instance profile that your Amazon EC2 instances use. -
setInstanceProfileArn
The ARN of the instance profile that your Amazon EC2 instances use. -
getInstanceType
The Amazon EC2 instance type to use. -
setInstanceType
The Amazon EC2 instance type to use. -
getServiceRoleArn
The service role that the AWS OpsWorks CM service backend uses to work with your account. -
setServiceRoleArn
The service role that the AWS OpsWorks CM service backend uses to work with your account. -
getAssociatePublicIpAddress
Associate a public IP address with a server that you are launching.Returns union: either
BooleanorIResolvable -
setAssociatePublicIpAddress
Associate a public IP address with a server that you are launching. -
setAssociatePublicIpAddress
Associate a public IP address with a server that you are launching. -
getBackupId
If you specify this field, AWS OpsWorks CM creates the server by using the backup represented by BackupId. -
setBackupId
If you specify this field, AWS OpsWorks CM creates the server by using the backup represented by BackupId. -
getBackupRetentionCount
The number of automated backups that you want to keep. -
setBackupRetentionCount
The number of automated backups that you want to keep. -
getCustomCertificate
Supported on servers running Chef Automate 2.0 only. A PEM-formatted HTTPS certificate. The value can be be a single, self-signed certificate, or a certificate chain. If you specify a custom certificate, you must also specify values forCustomDomainandCustomPrivateKey. The following are requirements for theCustomCertificatevalue:. -
setCustomCertificate
Supported on servers running Chef Automate 2.0 only. A PEM-formatted HTTPS certificate. The value can be be a single, self-signed certificate, or a certificate chain. If you specify a custom certificate, you must also specify values forCustomDomainandCustomPrivateKey. The following are requirements for theCustomCertificatevalue:. -
getCustomDomain
Supported on servers running Chef Automate 2.0 only. An optional public endpoint of a server, such ashttps://aws.my-company.com. To access the server, create a CNAME DNS record in your preferred DNS service that points the custom domain to the endpoint that is generated when the server is created (the value of the CreateServer Endpoint attribute). You cannot access the server by using the generatedEndpointvalue if the server is using a custom domain. If you specify a custom domain, you must also specify values forCustomCertificateandCustomPrivateKey. -
setCustomDomain
Supported on servers running Chef Automate 2.0 only. An optional public endpoint of a server, such ashttps://aws.my-company.com. To access the server, create a CNAME DNS record in your preferred DNS service that points the custom domain to the endpoint that is generated when the server is created (the value of the CreateServer Endpoint attribute). You cannot access the server by using the generatedEndpointvalue if the server is using a custom domain. If you specify a custom domain, you must also specify values forCustomCertificateandCustomPrivateKey. -
getCustomPrivateKey
Supported on servers running Chef Automate 2.0 only. A private key in PEM format for connecting to the server by using HTTPS. The private key must not be encrypted; it cannot be protected by a password or passphrase. If you specify a custom private key, you must also specify values forCustomDomainandCustomCertificate. -
setCustomPrivateKey
Supported on servers running Chef Automate 2.0 only. A private key in PEM format for connecting to the server by using HTTPS. The private key must not be encrypted; it cannot be protected by a password or passphrase. If you specify a custom private key, you must also specify values forCustomDomainandCustomCertificate. -
getDisableAutomatedBackup
Enable or disable scheduled backups.Returns union: either
BooleanorIResolvable -
setDisableAutomatedBackup
Enable or disable scheduled backups. -
setDisableAutomatedBackup
Enable or disable scheduled backups. -
getEngine
The configuration management engine to use. -
setEngine
The configuration management engine to use. -
getEngineAttributes
Optional engine attributes on a specified server.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnServer.EngineAttributeProperty> -
setEngineAttributes
Optional engine attributes on a specified server. -
setEngineAttributes
Optional engine attributes on a specified server. -
getEngineModel
The engine model of the server. -
setEngineModel
The engine model of the server. -
getEngineVersion
The major release version of the engine that you want to use. -
setEngineVersion
The major release version of the engine that you want to use. -
getKeyPair
The Amazon EC2 key pair to set for the instance. -
setKeyPair
The Amazon EC2 key pair to set for the instance. -
getPreferredBackupWindow
The start time for a one-hour period during which AWS OpsWorks CM backs up application-level data on your server if automated backups are enabled. -
setPreferredBackupWindow
The start time for a one-hour period during which AWS OpsWorks CM backs up application-level data on your server if automated backups are enabled. -
getPreferredMaintenanceWindow
The start time for a one-hour period each week during which AWS OpsWorks CM performs maintenance on the instance. -
setPreferredMaintenanceWindow
The start time for a one-hour period each week during which AWS OpsWorks CM performs maintenance on the instance. -
getSecurityGroupIds
A list of security group IDs to attach to the Amazon EC2 instance. -
setSecurityGroupIds
A list of security group IDs to attach to the Amazon EC2 instance. -
getSubnetIds
The IDs of subnets in which to launch the server EC2 instance. -
setSubnetIds
The IDs of subnets in which to launch the server EC2 instance. -
getTagsRaw
A map that contains tag keys and tag values to attach to an AWS OpsWorks for Chef Automate or OpsWorks for Puppet Enterprise server. -
setTagsRaw
A map that contains tag keys and tag values to attach to an AWS OpsWorks for Chef Automate or OpsWorks for Puppet Enterprise server.
-