Class: AWSCDK::OpsWorksCM::CfnServerProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::OpsWorksCM::CfnServerProps
- Defined in:
- ops_works_cm/cfn_server_props.rb
Overview
Properties for defining a CfnServer.
Instance Attribute Summary collapse
-
#associate_public_ip_address ⇒ Boolean, ...
readonly
Associate a public IP address with a server that you are launching.
-
#backup_id ⇒ String?
readonly
If you specify this field, AWS OpsWorks CM creates the server by using the backup represented by BackupId.
-
#backup_retention_count ⇒ Numeric?
readonly
The number of automated backups that you want to keep.
-
#custom_certificate ⇒ String?
readonly
Supported on servers running Chef Automate 2.0 only.
-
#custom_domain ⇒ String?
readonly
Supported on servers running Chef Automate 2.0 only.
-
#custom_private_key ⇒ String?
readonly
Supported on servers running Chef Automate 2.0 only.
-
#disable_automated_backup ⇒ Boolean, ...
readonly
Enable or disable scheduled backups.
-
#engine ⇒ String?
readonly
The configuration management engine to use.
-
#engine_attributes ⇒ AWSCDK::IResolvable, ...
readonly
Optional engine attributes on a specified server.
-
#engine_model ⇒ String?
readonly
The engine model of the server.
-
#engine_version ⇒ String?
readonly
The major release version of the engine that you want to use.
-
#instance_profile_arn ⇒ String
readonly
The ARN of the instance profile that your Amazon EC2 instances use.
-
#instance_type ⇒ String
readonly
The Amazon EC2 instance type to use.
-
#key_pair ⇒ String?
readonly
The Amazon EC2 key pair to set for the instance.
-
#preferred_backup_window ⇒ String?
readonly
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.
-
#preferred_maintenance_window ⇒ String?
readonly
The start time for a one-hour period each week during which AWS OpsWorks CM performs maintenance on the instance.
-
#security_group_ids ⇒ Array<String>?
readonly
A list of security group IDs to attach to the Amazon EC2 instance.
-
#service_role_arn ⇒ String
readonly
The service role that the AWS OpsWorks CM service backend uses to work with your account.
-
#subnet_ids ⇒ Array<String>?
readonly
The IDs of subnets in which to launch the server EC2 instance.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
A map that contains tag keys and tag values to attach to an AWS OpsWorks for Chef Automate or OpsWorks for Puppet Enterprise server.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(instance_profile_arn:, instance_type:, service_role_arn:, associate_public_ip_address: nil, backup_id: nil, backup_retention_count: nil, custom_certificate: nil, custom_domain: nil, custom_private_key: nil, disable_automated_backup: nil, engine: nil, engine_attributes: nil, engine_model: nil, engine_version: nil, key_pair: nil, preferred_backup_window: nil, preferred_maintenance_window: nil, security_group_ids: nil, subnet_ids: nil, tags: nil) ⇒ CfnServerProps
constructor
A new instance of CfnServerProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(instance_profile_arn:, instance_type:, service_role_arn:, associate_public_ip_address: nil, backup_id: nil, backup_retention_count: nil, custom_certificate: nil, custom_domain: nil, custom_private_key: nil, disable_automated_backup: nil, engine: nil, engine_attributes: nil, engine_model: nil, engine_version: nil, key_pair: nil, preferred_backup_window: nil, preferred_maintenance_window: nil, security_group_ids: nil, subnet_ids: nil, tags: nil) ⇒ CfnServerProps
Returns a new instance of CfnServerProps.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'ops_works_cm/cfn_server_props.rb', line 29 def initialize(instance_profile_arn:, instance_type:, service_role_arn:, associate_public_ip_address: nil, backup_id: nil, backup_retention_count: nil, custom_certificate: nil, custom_domain: nil, custom_private_key: nil, disable_automated_backup: nil, engine: nil, engine_attributes: nil, engine_model: nil, engine_version: nil, key_pair: nil, preferred_backup_window: nil, preferred_maintenance_window: nil, security_group_ids: nil, subnet_ids: nil, tags: nil) @instance_profile_arn = instance_profile_arn Jsii::Type.check_type(@instance_profile_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceProfileArn") @instance_type = instance_type Jsii::Type.check_type(@instance_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceType") @service_role_arn = service_role_arn Jsii::Type.check_type(@service_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceRoleArn") @associate_public_ip_address = associate_public_ip_address Jsii::Type.check_type(@associate_public_ip_address, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "associatePublicIpAddress") unless @associate_public_ip_address.nil? @backup_id = backup_id Jsii::Type.check_type(@backup_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "backupId") unless @backup_id.nil? @backup_retention_count = backup_retention_count Jsii::Type.check_type(@backup_retention_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "backupRetentionCount") unless @backup_retention_count.nil? @custom_certificate = custom_certificate Jsii::Type.check_type(@custom_certificate, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "customCertificate") unless @custom_certificate.nil? @custom_domain = custom_domain Jsii::Type.check_type(@custom_domain, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "customDomain") unless @custom_domain.nil? @custom_private_key = custom_private_key Jsii::Type.check_type(@custom_private_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "customPrivateKey") unless @custom_private_key.nil? @disable_automated_backup = disable_automated_backup Jsii::Type.check_type(@disable_automated_backup, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "disableAutomatedBackup") unless @disable_automated_backup.nil? @engine = engine Jsii::Type.check_type(@engine, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "engine") unless @engine.nil? @engine_attributes = engine_attributes Jsii::Type.check_type(@engine_attributes, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfb3Bzd29ya3NjbS5DZm5TZXJ2ZXIuRW5naW5lQXR0cmlidXRlUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "engineAttributes") unless @engine_attributes.nil? @engine_model = engine_model Jsii::Type.check_type(@engine_model, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "engineModel") unless @engine_model.nil? @engine_version = engine_version Jsii::Type.check_type(@engine_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "engineVersion") unless @engine_version.nil? @key_pair = key_pair Jsii::Type.check_type(@key_pair, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "keyPair") unless @key_pair.nil? @preferred_backup_window = preferred_backup_window Jsii::Type.check_type(@preferred_backup_window, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "preferredBackupWindow") unless @preferred_backup_window.nil? @preferred_maintenance_window = preferred_maintenance_window Jsii::Type.check_type(@preferred_maintenance_window, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "preferredMaintenanceWindow") unless @preferred_maintenance_window.nil? @security_group_ids = security_group_ids Jsii::Type.check_type(@security_group_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "securityGroupIds") unless @security_group_ids.nil? @subnet_ids = subnet_ids Jsii::Type.check_type(@subnet_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "subnetIds") unless @subnet_ids.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#associate_public_ip_address ⇒ Boolean, ... (readonly)
Associate a public IP address with a server that you are launching.
Valid values are true or false . The default value is true .
95 96 97 |
# File 'ops_works_cm/cfn_server_props.rb', line 95 def associate_public_ip_address @associate_public_ip_address end |
#backup_id ⇒ String? (readonly)
If you specify this field, AWS OpsWorks CM creates the server by using the backup represented by BackupId.
100 101 102 |
# File 'ops_works_cm/cfn_server_props.rb', line 100 def backup_id @backup_id end |
#backup_retention_count ⇒ Numeric? (readonly)
The number of automated backups that you want to keep.
Whenever a new backup is created, AWS OpsWorks CM deletes the oldest backups if this number is exceeded. The default value is 1 .
107 108 109 |
# File 'ops_works_cm/cfn_server_props.rb', line 107 def backup_retention_count @backup_retention_count end |
#custom_certificate ⇒ String? (readonly)
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 for CustomDomain and CustomPrivateKey . The following are requirements for the CustomCertificate value:.
- 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.
118 119 120 |
# File 'ops_works_cm/cfn_server_props.rb', line 118 def custom_certificate @custom_certificate end |
#custom_domain ⇒ String? (readonly)
Supported on servers running Chef Automate 2.0 only. An optional public endpoint of a server, such as https://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 generated Endpoint value if the server is using a custom domain. If you specify a custom domain, you must also specify values for CustomCertificate and CustomPrivateKey .
123 124 125 |
# File 'ops_works_cm/cfn_server_props.rb', line 123 def custom_domain @custom_domain end |
#custom_private_key ⇒ String? (readonly)
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 for CustomDomain and CustomCertificate .
128 129 130 |
# File 'ops_works_cm/cfn_server_props.rb', line 128 def custom_private_key @custom_private_key end |
#disable_automated_backup ⇒ Boolean, ... (readonly)
Enable or disable scheduled backups.
Valid values are true or false . The default value is true .
135 136 137 |
# File 'ops_works_cm/cfn_server_props.rb', line 135 def disable_automated_backup @disable_automated_backup end |
#engine ⇒ String? (readonly)
The configuration management engine to use.
Valid values include ChefAutomate and Puppet .
142 143 144 |
# File 'ops_works_cm/cfn_server_props.rb', line 142 def engine @engine end |
#engine_attributes ⇒ AWSCDK::IResolvable, ... (readonly)
Optional engine attributes on a specified server.
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.
156 157 158 |
# File 'ops_works_cm/cfn_server_props.rb', line 156 def engine_attributes @engine_attributes end |
#engine_model ⇒ String? (readonly)
The engine model of the server.
Valid values in this release include Monolithic for Puppet and Single for Chef.
163 164 165 |
# File 'ops_works_cm/cfn_server_props.rb', line 163 def engine_model @engine_model end |
#engine_version ⇒ String? (readonly)
The major release version of the engine that you want to use.
For a Chef server, the valid value for EngineVersion is currently 2 . For a Puppet server, valid values are 2019 or 2017 .
170 171 172 |
# File 'ops_works_cm/cfn_server_props.rb', line 170 def engine_version @engine_version end |
#instance_profile_arn ⇒ String (readonly)
The ARN of the instance profile that your Amazon EC2 instances use.
76 77 78 |
# File 'ops_works_cm/cfn_server_props.rb', line 76 def instance_profile_arn @instance_profile_arn end |
#instance_type ⇒ String (readonly)
The Amazon EC2 instance type to use.
For example, m5.large .
83 84 85 |
# File 'ops_works_cm/cfn_server_props.rb', line 83 def instance_type @instance_type end |
#key_pair ⇒ String? (readonly)
The Amazon EC2 key pair to set for the instance.
This parameter is optional; if desired, you may specify this parameter to connect to your instances by using SSH.
177 178 179 |
# File 'ops_works_cm/cfn_server_props.rb', line 177 def key_pair @key_pair end |
#preferred_backup_window ⇒ String? (readonly)
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.
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.)
193 194 195 |
# File 'ops_works_cm/cfn_server_props.rb', line 193 def preferred_backup_window @preferred_backup_window end |
#preferred_maintenance_window ⇒ String? (readonly)
The start time for a one-hour period each week during which AWS OpsWorks CM performs maintenance on the instance.
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.)
202 203 204 |
# File 'ops_works_cm/cfn_server_props.rb', line 202 def preferred_maintenance_window @preferred_maintenance_window end |
#security_group_ids ⇒ Array<String>? (readonly)
A list of security group IDs to attach to the Amazon EC2 instance.
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).
211 212 213 |
# File 'ops_works_cm/cfn_server_props.rb', line 211 def security_group_ids @security_group_ids end |
#service_role_arn ⇒ String (readonly)
The service role that the AWS OpsWorks CM service backend uses to work with your account.
88 89 90 |
# File 'ops_works_cm/cfn_server_props.rb', line 88 def service_role_arn @service_role_arn end |
#subnet_ids ⇒ Array<String>? (readonly)
The IDs of subnets in which to launch the server EC2 instance.
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 .
222 223 224 |
# File 'ops_works_cm/cfn_server_props.rb', line 222 def subnet_ids @subnet_ids end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
A map that contains tag keys and tag values to attach to an AWS OpsWorks for Chef Automate or OpsWorks for Puppet Enterprise server.
- 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: `+ - = . _ : /
230 231 232 |
# File 'ops_works_cm/cfn_server_props.rb', line 230 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
# File 'ops_works_cm/cfn_server_props.rb', line 232 def self.jsii_properties { :instance_profile_arn => "instanceProfileArn", :instance_type => "instanceType", :service_role_arn => "serviceRoleArn", :associate_public_ip_address => "associatePublicIpAddress", :backup_id => "backupId", :backup_retention_count => "backupRetentionCount", :custom_certificate => "customCertificate", :custom_domain => "customDomain", :custom_private_key => "customPrivateKey", :disable_automated_backup => "disableAutomatedBackup", :engine => "engine", :engine_attributes => "engineAttributes", :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 => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'ops_works_cm/cfn_server_props.rb', line 257 def to_jsii result = {} result.merge!({ "instanceProfileArn" => @instance_profile_arn, "instanceType" => @instance_type, "serviceRoleArn" => @service_role_arn, "associatePublicIpAddress" => @associate_public_ip_address, "backupId" => @backup_id, "backupRetentionCount" => @backup_retention_count, "customCertificate" => @custom_certificate, "customDomain" => @custom_domain, "customPrivateKey" => @custom_private_key, "disableAutomatedBackup" => @disable_automated_backup, "engine" => @engine, "engineAttributes" => @engine_attributes, "engineModel" => @engine_model, "engineVersion" => @engine_version, "keyPair" => @key_pair, "preferredBackupWindow" => @preferred_backup_window, "preferredMaintenanceWindow" => @preferred_maintenance_window, "securityGroupIds" => @security_group_ids, "subnetIds" => @subnet_ids, "tags" => @tags, }) result.compact end |