OpsWorks class

Welcome to the AWS OpsWorks Stacks API Reference. This guide provides descriptions, syntax, and usage examples for AWS OpsWorks Stacks actions and data types, including common parameters and error codes.

Constructors

OpsWorks({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

assignInstance({required String instanceId, required List<String> layerIds}) Future<void>
Assign a registered instance to a layer.
assignVolume({required String volumeId, String? instanceId}) Future<void>
Assigns one of the stack's registered Amazon EBS volumes to a specified instance. The volume must first be registered with the stack by calling RegisterVolume. After you register the volume, you must call UpdateVolume to specify a mount point before calling AssignVolume. For more information, see Resource Management.
associateElasticIp({required String elasticIp, String? instanceId}) Future<void>
Associates one of the stack's registered Elastic IP addresses with a specified instance. The address must first be registered with the stack by calling RegisterElasticIp. For more information, see Resource Management.
attachElasticLoadBalancer({required String elasticLoadBalancerName, required String layerId}) Future<void>
Attaches an Elastic Load Balancing load balancer to a specified layer. AWS OpsWorks Stacks does not support Application Load Balancer. You can only use Classic Load Balancer with AWS OpsWorks Stacks. For more information, see Elastic Load Balancing. 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.
cloneStack({required String serviceRoleArn, required String sourceStackId, String? agentVersion, Map<StackAttributesKeys, String>? attributes, ChefConfiguration? chefConfiguration, List<String>? cloneAppIds, bool? clonePermissions, StackConfigurationManager? configurationManager, Source? customCookbooksSource, String? customJson, String? defaultAvailabilityZone, String? defaultInstanceProfileArn, String? defaultOs, RootDeviceType? defaultRootDeviceType, String? defaultSshKeyName, String? defaultSubnetId, String? hostnameTheme, String? name, String? region, bool? useCustomCookbooks, bool? useOpsworksSecurityGroups, String? vpcId}) Future<CloneStackResult>
Creates a clone of a specified stack. For more information, see Clone a Stack. By default, all parameters are set to the values used by the parent stack.
close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
createApp({required String name, required String stackId, required AppType type, Source? appSource, Map<AppAttributesKeys, String>? attributes, List<DataSource>? dataSources, String? description, List<String>? domains, bool? enableSsl, List<EnvironmentVariable>? environment, String? shortname, SslConfiguration? sslConfiguration}) Future<CreateAppResult>
Creates an app for a specified stack. For more information, see Creating Apps.
createDeployment({required DeploymentCommand command, required String stackId, String? appId, String? comment, String? customJson, List<String>? instanceIds, List<String>? layerIds}) Future<CreateDeploymentResult>
Runs deployment or stack commands. For more information, see Deploying Apps and Run Stack Commands.
createInstance({required String instanceType, required List<String> layerIds, required String stackId, String? agentVersion, String? amiId, Architecture? architecture, AutoScalingType? autoScalingType, String? availabilityZone, List<BlockDeviceMapping>? blockDeviceMappings, bool? ebsOptimized, String? hostname, bool? installUpdatesOnBoot, String? os, RootDeviceType? rootDeviceType, String? sshKeyName, String? subnetId, String? tenancy, String? virtualizationType}) Future<CreateInstanceResult>
Creates an instance in a specified stack. For more information, see Adding an Instance to a Layer.
createLayer({required String name, required String shortname, required String stackId, required LayerType type, Map<LayerAttributesKeys, String>? attributes, bool? autoAssignElasticIps, bool? autoAssignPublicIps, CloudWatchLogsConfiguration? cloudWatchLogsConfiguration, String? customInstanceProfileArn, String? customJson, Recipes? customRecipes, List<String>? customSecurityGroupIds, bool? enableAutoHealing, bool? installUpdatesOnBoot, LifecycleEventConfiguration? lifecycleEventConfiguration, List<String>? packages, bool? useEbsOptimizedInstances, List<VolumeConfiguration>? volumeConfigurations}) Future<CreateLayerResult>
Creates a layer. For more information, see How to Create 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.
createStack({required String defaultInstanceProfileArn, required String name, required String region, required String serviceRoleArn, String? agentVersion, Map<StackAttributesKeys, String>? attributes, ChefConfiguration? chefConfiguration, StackConfigurationManager? configurationManager, Source? customCookbooksSource, String? customJson, String? defaultAvailabilityZone, String? defaultOs, RootDeviceType? defaultRootDeviceType, String? defaultSshKeyName, String? defaultSubnetId, String? hostnameTheme, bool? useCustomCookbooks, bool? useOpsworksSecurityGroups, String? vpcId}) Future<CreateStackResult>
Creates a new stack. For more information, see Create a New Stack.
createUserProfile({required String iamUserArn, bool? allowSelfManagement, String? sshPublicKey, String? sshUsername}) Future<CreateUserProfileResult>
Creates a new user profile.
deleteApp({required String appId}) Future<void>
Deletes a specified app.
deleteInstance({required String instanceId, bool? deleteElasticIp, bool? deleteVolumes}) Future<void>
Deletes a specified instance, which terminates the associated Amazon EC2 instance. You must stop an instance before you can delete it.
deleteLayer({required String layerId}) Future<void>
Deletes a specified layer. You must first stop and then delete all associated instances or unassign registered instances. For more information, see How to Delete a Layer.
deleteStack({required String stackId}) Future<void>
Deletes a specified stack. You must first delete all instances, layers, and apps or deregister registered instances. For more information, see Shut Down a Stack.
deleteUserProfile({required String iamUserArn}) Future<void>
Deletes a user profile.
deregisterEcsCluster({required String ecsClusterArn}) Future<void>
Deregisters a specified Amazon ECS cluster from a stack. For more information, see Resource Management.
deregisterElasticIp({required String elasticIp}) Future<void>
Deregisters a specified Elastic IP address. The address can then be registered by another stack. For more information, see Resource Management.
deregisterInstance({required String instanceId}) Future<void>
Deregister a registered Amazon EC2 or on-premises instance. This action removes the instance from the stack and returns it to your control. This action cannot be used with instances that were created with AWS OpsWorks Stacks.
deregisterRdsDbInstance({required String rdsDbInstanceArn}) Future<void>
Deregisters an Amazon RDS instance.
deregisterVolume({required String volumeId}) Future<void>
Deregisters an Amazon EBS volume. The volume can then be registered by another stack. For more information, see Resource Management.
describeAgentVersions({StackConfigurationManager? configurationManager, String? stackId}) Future<DescribeAgentVersionsResult>
Describes the available AWS OpsWorks Stacks agent versions. You must specify a stack ID or a configuration manager. DescribeAgentVersions returns a list of available agent versions for the specified stack or configuration manager.
describeApps({List<String>? appIds, String? stackId}) Future<DescribeAppsResult>
Requests a description of a specified set of apps. Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
describeCommands({List<String>? commandIds, String? deploymentId, String? instanceId}) Future<DescribeCommandsResult>
Describes the results of specified commands. Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
describeDeployments({String? appId, List<String>? deploymentIds, String? stackId}) Future<DescribeDeploymentsResult>
Requests a description of a specified set of deployments. Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
describeEcsClusters({List<String>? ecsClusterArns, int? maxResults, String? nextToken, String? stackId}) Future<DescribeEcsClustersResult>
Describes Amazon ECS clusters that are registered with a stack. If you specify only a stack ID, you can use the MaxResults and NextToken parameters to paginate the response. However, AWS OpsWorks Stacks currently supports only one cluster per layer, so the result set has a maximum of one element.
describeElasticIps({String? instanceId, List<String>? ips, String? stackId}) Future<DescribeElasticIpsResult>
Describes Elastic IP addresses. Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
describeElasticLoadBalancers({List<String>? layerIds, String? stackId}) Future<DescribeElasticLoadBalancersResult>
Describes a stack's Elastic Load Balancing instances. Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
describeInstances({List<String>? instanceIds, String? layerId, String? stackId}) Future<DescribeInstancesResult>
Requests a description of a set of instances. Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
describeLayers({List<String>? layerIds, String? stackId}) Future<DescribeLayersResult>
Requests a description of one or more layers in a specified stack. Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
describeLoadBasedAutoScaling({required List<String> layerIds}) Future<DescribeLoadBasedAutoScalingResult>
Describes load-based auto scaling configurations for specified layers. Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
describeMyUserProfile() Future<DescribeMyUserProfileResult>
Describes a user's SSH information.
describeOperatingSystems() Future<DescribeOperatingSystemsResponse>
Describes the operating systems that are supported by AWS OpsWorks Stacks.
describePermissions({String? iamUserArn, String? stackId}) Future<DescribePermissionsResult>
Describes the permissions for a specified stack.
describeRaidArrays({String? instanceId, List<String>? raidArrayIds, String? stackId}) Future<DescribeRaidArraysResult>
Describe an instance's RAID arrays. Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
describeRdsDbInstances({required String stackId, List<String>? rdsDbInstanceArns}) Future<DescribeRdsDbInstancesResult>
Describes Amazon RDS instances.
describeServiceErrors({String? instanceId, List<String>? serviceErrorIds, String? stackId}) Future<DescribeServiceErrorsResult>
Describes AWS OpsWorks Stacks service errors.
describeStackProvisioningParameters({required String stackId}) Future<DescribeStackProvisioningParametersResult>
Requests a description of a stack's provisioning parameters.
describeStacks({List<String>? stackIds}) Future<DescribeStacksResult>
Requests a description of one or more stacks.
describeStackSummary({required String stackId}) Future<DescribeStackSummaryResult>
Describes the number of layers and apps in a specified stack, and the number of instances in each state, such as running_setup or online.
describeTimeBasedAutoScaling({required List<String> instanceIds}) Future<DescribeTimeBasedAutoScalingResult>
Describes time-based auto scaling configurations for specified instances. Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
describeUserProfiles({List<String>? iamUserArns}) Future<DescribeUserProfilesResult>
Describe specified users.
describeVolumes({String? instanceId, String? raidArrayId, String? stackId, List<String>? volumeIds}) Future<DescribeVolumesResult>
Describes an instance's Amazon EBS volumes. Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
detachElasticLoadBalancer({required String elasticLoadBalancerName, required String layerId}) Future<void>
Detaches a specified Elastic Load Balancing instance from its layer.
disassociateElasticIp({required String elasticIp}) Future<void>
Disassociates an Elastic IP address from its instance. The address remains registered with the stack. For more information, see Resource Management.
getHostnameSuggestion({required String layerId}) Future<GetHostnameSuggestionResult>
Gets a generated host name for the specified layer, based on the current host name theme.
grantAccess({required String instanceId, int? validForInMinutes}) Future<GrantAccessResult>
May throw ValidationException. May throw ResourceNotFoundException.
listTags({required String resourceArn, int? maxResults, String? nextToken}) Future<ListTagsResult>
Returns a list of tags that are applied to the specified stack or layer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rebootInstance({required String instanceId}) Future<void>
Reboots a specified instance. For more information, see Starting, Stopping, and Rebooting Instances.
registerEcsCluster({required String ecsClusterArn, required String stackId}) Future<RegisterEcsClusterResult>
Registers a specified Amazon ECS cluster with a stack. You can register only one cluster with a stack. A cluster can be registered with only one stack. For more information, see Resource Management.
registerElasticIp({required String elasticIp, required String stackId}) Future<RegisterElasticIpResult>
Registers an Elastic IP address with a specified stack. An address can be registered with only one stack at a time. If the address is already registered, you must first deregister it by calling DeregisterElasticIp. For more information, see Resource Management.
registerInstance({required String stackId, String? hostname, InstanceIdentity? instanceIdentity, String? privateIp, String? publicIp, String? rsaPublicKey, String? rsaPublicKeyFingerprint}) Future<RegisterInstanceResult>
Registers instances that were created outside of AWS OpsWorks Stacks with a specified stack. Registered instances have the same requirements as instances that are created by using the CreateInstance API. For example, registered instances must be running a supported Linux-based operating system, and they must have a supported instance type. For more information about requirements for instances that you want to register, see Preparing the Instance.
registerRdsDbInstance({required String dbPassword, required String dbUser, required String rdsDbInstanceArn, required String stackId}) Future<void>
Registers an Amazon RDS instance with a stack.
registerVolume({required String stackId, String? ec2VolumeId}) Future<RegisterVolumeResult>
Registers an Amazon EBS volume with a specified stack. A volume can be registered with only one stack at a time. If the volume is already registered, you must first deregister it by calling DeregisterVolume. For more information, see Resource Management.
setLoadBasedAutoScaling({required String layerId, AutoScalingThresholds? downScaling, bool? enable, AutoScalingThresholds? upScaling}) Future<void>
Specify the load-based auto scaling configuration for a specified layer. For more information, see Managing Load with Time-based and Load-based Instances. 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.
setPermission({required String iamUserArn, required String stackId, bool? allowSsh, bool? allowSudo, String? level}) Future<void>
Specifies a user's permissions. For more information, see Security and Permissions.
setTimeBasedAutoScaling({required String instanceId, WeeklyAutoScalingSchedule? autoScalingSchedule}) Future<void>
Specify the time-based auto scaling configuration for a specified instance. For more information, see Managing Load with Time-based and Load-based Instances.
startInstance({required String instanceId}) Future<void>
Starts a specified instance. For more information, see Starting, Stopping, and Rebooting Instances.
startStack({required String stackId}) Future<void>
Starts a stack's instances.
stopInstance({required String instanceId, bool? force}) Future<void>
Stops a specified instance. When you stop a standard instance, the data disappears and must be reinstalled when you restart the instance. You can stop an Amazon EBS-backed instance without losing data. For more information, see Starting, Stopping, and Rebooting Instances.
stopStack({required String stackId}) Future<void>
Stops a specified stack.
tagResource({required String resourceArn, required Map<String, String> tags}) Future<void>
Apply cost-allocation tags to a specified stack or layer in AWS OpsWorks Stacks. For more information about how tagging works, see Tags in the AWS OpsWorks User Guide.
toString() String
A string representation of this object.
inherited
unassignInstance({required String instanceId}) Future<void>
Unassigns a registered instance from all layers that are using the instance. The instance remains in the stack as an unassigned instance, and can be assigned to another layer as needed. You cannot use this action with instances that were created with AWS OpsWorks Stacks.
unassignVolume({required String volumeId}) Future<void>
Unassigns an assigned Amazon EBS volume. The volume remains registered with the stack. For more information, see Resource Management.
untagResource({required String resourceArn, required List<String> tagKeys}) Future<void>
Removes tags from a specified stack or layer.
updateApp({required String appId, Source? appSource, Map<AppAttributesKeys, String>? attributes, List<DataSource>? dataSources, String? description, List<String>? domains, bool? enableSsl, List<EnvironmentVariable>? environment, String? name, SslConfiguration? sslConfiguration, AppType? type}) Future<void>
Updates a specified app.
updateElasticIp({required String elasticIp, String? name}) Future<void>
Updates a registered Elastic IP address's name. For more information, see Resource Management.
updateInstance({required String instanceId, String? agentVersion, String? amiId, Architecture? architecture, AutoScalingType? autoScalingType, bool? ebsOptimized, String? hostname, bool? installUpdatesOnBoot, String? instanceType, List<String>? layerIds, String? os, String? sshKeyName}) Future<void>
Updates a specified instance.
updateLayer({required String layerId, Map<LayerAttributesKeys, String>? attributes, bool? autoAssignElasticIps, bool? autoAssignPublicIps, CloudWatchLogsConfiguration? cloudWatchLogsConfiguration, String? customInstanceProfileArn, String? customJson, Recipes? customRecipes, List<String>? customSecurityGroupIds, bool? enableAutoHealing, bool? installUpdatesOnBoot, LifecycleEventConfiguration? lifecycleEventConfiguration, String? name, List<String>? packages, String? shortname, bool? useEbsOptimizedInstances, List<VolumeConfiguration>? volumeConfigurations}) Future<void>
Updates a specified layer.
updateMyUserProfile({String? sshPublicKey}) Future<void>
Updates a user's SSH public key.
updateRdsDbInstance({required String rdsDbInstanceArn, String? dbPassword, String? dbUser}) Future<void>
Updates an Amazon RDS instance.
updateStack({required String stackId, String? agentVersion, Map<StackAttributesKeys, String>? attributes, ChefConfiguration? chefConfiguration, StackConfigurationManager? configurationManager, Source? customCookbooksSource, String? customJson, String? defaultAvailabilityZone, String? defaultInstanceProfileArn, String? defaultOs, RootDeviceType? defaultRootDeviceType, String? defaultSshKeyName, String? defaultSubnetId, String? hostnameTheme, String? name, String? serviceRoleArn, bool? useCustomCookbooks, bool? useOpsworksSecurityGroups}) Future<void>
Updates a specified stack.
updateUserProfile({required String iamUserArn, bool? allowSelfManagement, String? sshPublicKey, String? sshUsername}) Future<void>
Updates a specified user profile.
updateVolume({required String volumeId, String? mountPoint, String? name}) Future<void>
Updates an Amazon EBS volume's name or mount point. For more information, see Resource Management.

Operators

operator ==(Object other) bool
The equality operator.
inherited