CfnServerProps
Properties for defining a CfnServer.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_opsworkscm as opsworkscm } from 'aws-cdk-lib';
const cfnServerProps: opsworkscm.CfnServerProps = {
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: [{
name: 'name',
value: 'value',
}],
engineModel: 'engineModel',
engineVersion: 'engineVersion',
keyPair: 'keyPair',
preferredBackupWindow: 'preferredBackupWindow',
preferredMaintenanceWindow: 'preferredMaintenanceWindow',
securityGroupIds: ['securityGroupIds'],
subnetIds: ['subnetIds'],
tags: [{
key: 'key',
value: 'value',
}],
};
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_opsworkscm as opsworkscm
cfn_server_props = opsworkscm.CfnServerProps(
instance_profile_arn="instanceProfileArn",
instance_type="instanceType",
service_role_arn="serviceRoleArn",
# the properties below are optional
associate_public_ip_address=False,
backup_id="backupId",
backup_retention_count=123,
custom_certificate="customCertificate",
custom_domain="customDomain",
custom_private_key="customPrivateKey",
disable_automated_backup=False,
engine="engine",
engine_attributes=[opsworkscm.CfnServer.EngineAttributeProperty(
name="name",
value="value"
)],
engine_model="engineModel",
engine_version="engineVersion",
key_pair="keyPair",
preferred_backup_window="preferredBackupWindow",
preferred_maintenance_window="preferredMaintenanceWindow",
security_group_ids=["securityGroupIds"],
subnet_ids=["subnetIds"],
tags=[CfnTag(
key="key",
value="value"
)]
)
// 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.*;
CfnServerProps cfnServerProps = CfnServerProps.builder()
.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();
// 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.OpsWorksCM;
var cfnServerProps = new CfnServerProps {
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 = new [] { new EngineAttributeProperty {
Name = "name",
Value = "value"
} },
EngineModel = "engineModel",
EngineVersion = "engineVersion",
KeyPair = "keyPair",
PreferredBackupWindow = "preferredBackupWindow",
PreferredMaintenanceWindow = "preferredMaintenanceWindow",
SecurityGroupIds = new [] { "securityGroupIds" },
SubnetIds = new [] { "subnetIds" },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
// 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"
cfnServerProps := &CfnServerProps{
InstanceProfileArn: jsii.String("instanceProfileArn"),
InstanceType: jsii.String("instanceType"),
ServiceRoleArn: jsii.String("serviceRoleArn"),
// the properties below are optional
AssociatePublicIpAddress: jsii.Boolean(false),
BackupId: jsii.String("backupId"),
BackupRetentionCount: jsii.Number(123),
CustomCertificate: jsii.String("customCertificate"),
CustomDomain: jsii.String("customDomain"),
CustomPrivateKey: jsii.String("customPrivateKey"),
DisableAutomatedBackup: jsii.Boolean(false),
Engine: jsii.String("engine"),
EngineAttributes: []interface{}{
&EngineAttributeProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
EngineModel: jsii.String("engineModel"),
EngineVersion: jsii.String("engineVersion"),
KeyPair: jsii.String("keyPair"),
PreferredBackupWindow: jsii.String("preferredBackupWindow"),
PreferredMaintenanceWindow: jsii.String("preferredMaintenanceWindow"),
SecurityGroupIds: []*string{
jsii.String("securityGroupIds"),
},
SubnetIds: []*string{
jsii.String("subnetIds"),
},
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
associatePublicIpAddressoptionalboolean | IResolvableassociate_public_ip_addressoptionaltyping.Union[bool, IResolvable]associatePublicIpAddressoptionalBooleanAssociatePublicIpAddressoptionalboolAssociatePublicIpAddressoptionalinterface{} #Valid values are true or false . The default value is true .
backupIdoptionalstringbackup_idoptionalstrbackupIdoptionalStringBackupIdoptionalstringBackupIdoptional*string #backupRetentionCountoptionalnumberbackup_retention_countoptionalint | floatbackupRetentionCountoptionalNumberBackupRetentionCountoptionaldoubleBackupRetentionCountoptional*float64 #Whenever a new backup is created, AWS OpsWorks CM deletes the oldest backups if this number is exceeded. The default value is 1 .
customCertificateoptionalstringcustom_certificateoptionalstrcustomCertificateoptionalStringCustomCertificateoptionalstringCustomCertificateoptional*string #notes
- You can provide either a self-signed, custom certificate, or the full certificate chain.
- The certificate must be a valid X509 certificate, or a certificate chain in PEM format.
- The certificate must be valid at the time of upload. A certificate can't be used before its validity period begins (the certificate's
NotBeforedate), or after it expires (the certificate'sNotAfterdate). - The certificate’s common name or subject alternative names (SANs), if present, must match the value of
CustomDomain. - The certificate must match the value of
CustomPrivateKey.
customDomainoptionalstringcustom_domainoptionalstrcustomDomainoptionalStringCustomDomainoptionalstringCustomDomainoptional*string #customPrivateKeyoptionalstringcustom_private_keyoptionalstrcustomPrivateKeyoptionalStringCustomPrivateKeyoptionalstringCustomPrivateKeyoptional*string #disableAutomatedBackupoptionalboolean | IResolvabledisable_automated_backupoptionaltyping.Union[bool, IResolvable]disableAutomatedBackupoptionalBooleanDisableAutomatedBackupoptionalboolDisableAutomatedBackupoptionalinterface{} #Valid values are true or false . The default value is true .
engineoptionalstringengineoptionalstrengineoptionalStringEngineoptionalstringEngineoptional*string #Valid values include ChefAutomate and Puppet .
engineAttributesoptionalIResolvable | IResolvable | CfnServer.engine_attributesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, EngineAttributeProperty]]]engineAttributesoptionalIResolvableEngineAttributesoptionalIResolvableEngineAttributesoptionalinterface{} #notes
Attributes accepted in a Chef createServer request: - CHEF_AUTOMATE_PIVOTAL_KEY : A base64-encoded RSA public key. The corresponding private key is required to access the Chef API. When no CHEF_AUTOMATE_PIVOTAL_KEY is set, a private key is generated and returned in the response. When you are specifying the value of CHEF_AUTOMATE_PIVOTAL_KEY as a parameter in the CloudFormation console, you must add newline ( \n ) characters at the end of each line of the pivotal key value.
CHEF_AUTOMATE_ADMIN_PASSWORD: The password for the administrative user in the Chef Automate web-based dashboard. The password length is a minimum of eight characters, and a maximum of 32. The password can contain letters, numbers, and special characters (!/@#$%^&+=_). The password must contain at least one lower case letter, one upper case letter, one number, and one special character. When no CHEF_AUTOMATE_ADMIN_PASSWORD is set, one is generated and returned in the response.
Attributes accepted in a Puppet createServer request: - PUPPET_ADMIN_PASSWORD : To work with the Puppet Enterprise console, a password must use ASCII characters.
PUPPET_R10K_REMOTE: The r10k remote is the URL of your control repository (for example, ssh://git@your.git-repo.com:user/control-repo.git). Specifying an r10k remote opens TCP port 8170.PUPPET_R10K_PRIVATE_KEY: If you are using a private Git repository, add PUPPET_R10K_PRIVATE_KEY to specify a PEM-encoded private SSH key.
engineModeloptionalstringengine_modeloptionalstrengineModeloptionalStringEngineModeloptionalstringEngineModeloptional*string #Valid values in this release include Monolithic for Puppet and Single for Chef.
engineVersionoptionalstringengine_versionoptionalstrengineVersionoptionalStringEngineVersionoptionalstringEngineVersionoptional*string #For a Chef server, the valid value for EngineVersion is currently 2 . For a Puppet server, valid values are 2019 or 2017 .
instanceProfileArnstringinstance_profile_arnstrinstanceProfileArnStringInstanceProfileArnstringInstanceProfileArn*string required #instanceTypestringinstance_typestrinstanceTypeStringInstanceTypestringInstanceType*string required #For example, m5.large .
keyPairoptionalstringkey_pairoptionalstrkeyPairoptionalStringKeyPairoptionalstringKeyPairoptional*string #This parameter is optional; if desired, you may specify this parameter to connect to your instances by using SSH.
preferredBackupWindowoptionalstringpreferred_backup_windowoptionalstrpreferredBackupWindowoptionalStringPreferredBackupWindowoptionalstringPreferredBackupWindowoptional*string #notes
Valid values must be specified in one of the following formats:
HH:MMfor daily backupsDDD:HH:MMfor weekly backups
MM must be specified as 00 . The specified time is in coordinated universal time (UTC). The default value is a random, daily start time.
Example: 08:00 , which represents a daily start time of 08:00 UTC.
Example: Mon:08:00 , which represents a start time of every Monday at 08:00 UTC. (8:00 a.m.)
preferredMaintenanceWindowoptionalstringpreferred_maintenance_windowoptionalstrpreferredMaintenanceWindowoptionalStringPreferredMaintenanceWindowoptionalstringPreferredMaintenanceWindowoptional*string #notes
Valid values must be specified in the following format: DDD:HH:MM . MM must be specified as 00 . The specified time is in coordinated universal time (UTC). The default value is a random one-hour period on Tuesday, Wednesday, or Friday. See TimeWindowDefinition for more information.
Example: Mon:08:00 , which represents a start time of every Monday at 08:00 UTC. (8:00 a.m.)
securityGroupIdsoptionalstring[]security_group_idsoptionaltyping.List[str]securityGroupIdsoptionalList<String>SecurityGroupIdsoptionalstring[]SecurityGroupIdsoptional*[]*string #notes
If you add this parameter, the specified security groups must be within the VPC that is specified by SubnetIds .
If you do not specify this parameter, AWS OpsWorks CM creates one new security group that uses TCP ports 22 and 443, open to 0.0.0.0/0 (everyone).
serviceRoleArnstringservice_role_arnstrserviceRoleArnStringServiceRoleArnstringServiceRoleArn*string required #subnetIdsoptionalstring[]subnet_idsoptionaltyping.List[str]subnetIdsoptionalList<String>SubnetIdsoptionalstring[]SubnetIdsoptional*[]*string #notes
Amazon EC2-Classic customers: This field is required. All servers must run within a VPC. The VPC must have "Auto Assign Public IP" enabled.
EC2-VPC customers: This field is optional. If you do not specify subnet IDs, your EC2 instances are created in a default subnet that is selected by Amazon EC2. If you specify subnet IDs, the VPC must have "Auto Assign Public IP" enabled.
For more information about supported Amazon EC2 platforms, see Supported Platforms .
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #- The key cannot be empty.
- The key can be a maximum of 127 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters: `+ - = . _ : /