Create Instance
opsworks_create_instance | R Documentation |
Creates an instance in a specified stack¶
Description¶
Creates an instance in a specified stack. For more information, see Adding an Instance to a Layer.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
Usage¶
opsworks_create_instance(StackId, LayerIds, InstanceType,
AutoScalingType, Hostname, Os, AmiId, SshKeyName, AvailabilityZone,
VirtualizationType, SubnetId, Architecture, RootDeviceType,
BlockDeviceMappings, InstallUpdatesOnBoot, EbsOptimized, AgentVersion,
Tenancy)
Arguments¶
StackId |
[required] The stack ID. |
LayerIds |
[required] An array that contains the instance's layer IDs. |
InstanceType |
[required] The instance type, such as |
AutoScalingType |
For load-based or time-based instances, the type. Windows stacks can use only time-based instances. |
Hostname |
The instance host name. The following are character limits for instance host names.
|
Os |
The instance's operating system, which must be set to one of the following.
Not all operating systems are supported with all versions of Chef. For more information about the supported operating systems, see OpsWorks Stacks Operating Systems. The default option is the current Amazon Linux version. If you set
this parameter to |
AmiId |
A custom AMI ID to be used to create the instance. The AMI should be based on one of the supported operating systems. For more information, see Using Custom AMIs. If you specify a custom AMI, you must set |
SshKeyName |
The instance's Amazon EC2 key-pair name. |
AvailabilityZone |
The instance Availability Zone. For more information, see Regions and Endpoints. |
VirtualizationType |
The instance's virtualization type, |
SubnetId |
The ID of the instance's subnet. If the stack is running in a VPC, you can use this parameter to override the stack's default subnet ID value and direct OpsWorks Stacks to launch the instance in a different subnet. |
Architecture |
The instance architecture. The default option is
|
RootDeviceType |
The instance root device type. For more information, see Storage for the Root Device. |
BlockDeviceMappings |
An array of |
InstallUpdatesOnBoot |
Whether to install operating system and package updates when the
instance boots. The default value is We strongly recommend using the default value of |
EbsOptimized |
Whether to create an Amazon EBS-optimized instance. |
AgentVersion |
The default OpsWorks Stacks agent version. You have the following options:
The default setting is |
Tenancy |
The instance's tenancy option. The default option is no tenancy,
or if the instance is running in a VPC, inherit tenancy settings from
the VPC. The following are valid values for this parameter:
|
Value¶
A list with the following syntax:
list(
InstanceId = "string"
)
Request syntax¶
svc$create_instance(
StackId = "string",
LayerIds = list(
"string"
),
InstanceType = "string",
AutoScalingType = "load"|"timer",
Hostname = "string",
Os = "string",
AmiId = "string",
SshKeyName = "string",
AvailabilityZone = "string",
VirtualizationType = "string",
SubnetId = "string",
Architecture = "x86_64"|"i386",
RootDeviceType = "ebs"|"instance-store",
BlockDeviceMappings = list(
list(
DeviceName = "string",
NoDevice = "string",
VirtualName = "string",
Ebs = list(
SnapshotId = "string",
Iops = 123,
VolumeSize = 123,
VolumeType = "gp2"|"io1"|"standard",
DeleteOnTermination = TRUE|FALSE
)
)
),
InstallUpdatesOnBoot = TRUE|FALSE,
EbsOptimized = TRUE|FALSE,
AgentVersion = "string",
Tenancy = "string"
)