Introduction
Opsworks is a complete application management solution for developers and IT administrators interested in operations. It is an Amazon DevOps service that allows you to Mode, Control, and Automate Applications of virtually any scale and complexity. The AWS OpsWorks CM service maintains and maintains configuration management servers. AWS OpsWorks CM may be used to establish and administer AWS OpsWorks for Chef Automate and Puppet Enterprise servers and add and delete nodes for the servers to manage.
AWS OpsWork also provides the ability to reduce mistakes with traditional scripted configurations. OpsWork is built on the Chef tool and works with receipts, on which the scripting languages would be based.
Source: R&DSolutions
Actions Supported
AWS OpsWorks offers a plethora of functions, some of which are listed below:
AssociateNode
It connects a new node to the server. Only servers in a HEALTHY condition can be paired with a node. In the absence of this, an InvalidStateException is thrown. When the server does not exist, a ResourceNotFoundException is thrown. When request parameters are invalid, a ValidationException is thrown. The AssociateNode API call can be used in Auto Scaling setups, AWS CloudFormation templates, or server instance user data.
If the operation is successful, the service responds with an HTTP 200.
DescribeEvents
It describes occurrences for a particular server. The results are sorted chronologically, with the most recent events appearing first. It is a synchronous operation. When the server does not exist, a ResourceNotFoundException is thrown. When request parameters are invalid, a ValidationException is thrown.
If the operation is successful, the service responds with an HTTP 200.
DescribeNodeAsscociation
It returns the present status of a current affiliation or disassociation request. A ResourceNotFoundException is produced when zero recent association or disassociation requests with the provided token are detected, or the server does not exist. When the request's arguments are invalid, a ValidationException is thrown.
If the operation is successful, the service responds with an HTTP 200.
DescribeServers
It displays a list of all configuration management servers associated with your account. Only the stored Amazon DynamoDB results are returned. AWS OpsWorks CM does not query other services. This is a synchronous operation. When the server does not exist, a ResourceNotFoundException is thrown. When request parameters are invalid, a ValidationException is thrown.
If the operation is successful, the service responds with an HTTP 200.
DisassociateNode
This disassociates a node from the AWS OpsWorks CM server and removes the node from the managed nodes of the server. The node key pair is no longer usable for using the configuration manager's API when a node is disassociated.
A node can only be disconnected from a server in the HEALTHY condition. In the absence of this, an InvalidStateException is thrown. When the server does not exist, a ResourceNotFoundException is thrown. When request parameters are invalid, a ValidationException is thrown.
If the operation is successful, the service responds with an HTTP 200.
ExportServerEngineAttribute
A given server engine attribute is exported as a base64-encoded string. You may, for example, export user data which can be used in EC2 to associate nodes with servers. This is a synchronous operation.
When request parameters are invalid, a ValidationException is thrown. When the server does not exist, a ResourceNotFoundException is thrown. When the server is in any of the following states: CREATING, TERMINATED, FAILED, or DELETING, an InvalidStateException is raised.
If the operation is successful, the service responds with an HTTP 200.
ListTagsForResource
It returns a list of tags that have been applied to the AWS OpsWorks for Chef Automate or for Puppet Enterprise servers that have been provided.
If the operation is successful, the service responds with an HTTP 200.
RestoreServer
Restores a backup to a server in the following states: CONNECTION LOST, HEALTHY, RUNNING, UNHEALTHY, or TERMINATED. When running RestoreServer, the server's EC2 instance is removed and replaced with a new EC2 instance. Because RestoreServer keeps the existing server endpoint, configuration management of the server's client devices continues to function normally. This is an asynchronous operation.
When the server is in an invalid state, an InvalidStateException is thrown. When the server does not exist, a ResourceNotFoundException is thrown. When request parameters are invalid, a ValidationException is thrown.
If the operation is successful, the service responds with an HTTP 200.
StartMaintenance
It initiates server maintenance manually. If an earlier maintenance effort fails and the underlying reason for the issue has been remedied, this command can be beneficial. While maintenance is being performed, the server is in the UNDER MAINTENANCE state.
Maintenance may only be initiated on servers that are HEALTHY or UNHEALTHY. In the absence of this, an InvalidStateException is thrown. When the server does not exist, a ResourceNotFoundException is thrown. When request parameters are invalid, a ValidationException is thrown.
If the operation is successful, the service responds with an HTTP 200.
TagResource
It adds tags to AWS OpsWorks for Chef Automate or Puppet Enterprise servers and server backups.
If the operation is successful, the service responds with an HTTP 200 with an empty HTTP body.
UntagResource
It deletes tags from an AWS OpsWorks CM server or backup. If the operation is successful, the service responds with an HTTP 200.
UpdateServer
It updates server settings. This is a synchronous operation. If the operation is successful, the service responds with an HTTP 200.
UpdateServerEngineAttributes
It makes changes to engine-specific attributes on a given server. When this operation is in progress, the server enters the MODIFYING state. Only one update can take place at a time. This is an asynchronous operation.
This operation can only be performed on either HEALTHY or UNHEALTHY. In the absence of this, an InvalidStateException is thrown. When the server does not exist, a ResourceNotFoundException is thrown. When request parameters are invalid, a ValidationException is thrown.
If the operation is successful, the service responds with an HTTP 200.
CreateBackup
It creates a server application-level backup. The server cannot be changed while in the BACKING UP state, and no additional backups can be made. Backups can be formed for RUNNING, HEALTHY, or UNHEALTHY. servers By default, you can only create 50 manual backups.
On reaching the maximum limit of manual backups, a LimitExceededException is thrown. When the server is not in one of the following states: RUNNING, HEALTHY, or UNHEALTHY, an InvalidStateException is thrown. When the server cannot be found, a ResourceNotFoundException is thrown. When request parameters are invalid, a ValidationException is thrown.
If the operation is successful, the service responds with an HTTP 200.
CreateServer
Creates and launches a new server immediately. When the server is in a HEALTHY state, it is ready to use. You can create a maximum of 10 servers by default. This is an asynchronous operation.
When you have created the maximum number of servers, a LimitExceededException is thrown. When a server with a similar name already exists in the account, a ResourceAlreadyExistsException is thrown. When you specify a backup ID that is invalid or for a backup that does not exist, a ResourceNotFoundException is thrown. When request parameters are invalid, a ValidationException is thrown.
If the operation is successful, the service responds with an HTTP 200.
DeleteBackup
It destroys a backup. Both manual and automated backups can be deleted. This is an asynchronous operation.
When a backup deletion is already in progress, an InvalidStateException is thrown. When the backup does not exist, a ResourceNotFoundException is thrown. When request parameters are invalid, a ValidationException is thrown.
If the operation is successful, the service responds with an HTTP 200.
DeleteServer
It deletes the server as well as the AWS CloudFormation stacks beneath it. The server state is changed to DELETING when you run this command. DescribeServer requests no longer return the server after it has been deleted. The server cannot be deleted if the AWS CloudFormation stack cannot be deleted. This is an asynchronous operation.
When a server deletion is already in progress, an InvalidStateException is thrown. When the server does not exist, a ResourceNotFoundException is thrown. When request parameters are invalid, a ValidationException is thrown.
If the operation is successful, the service responds with an HTTP 200.
DescribeAccountAttributes
It describes the attributes of your AWS OpsWorks CM account. This is a synchronous operation. If the operation is successful, the service responds with an HTTP 200.
DescribeBackups
It explains backups. The backups are listed in chronological order, with the most recent backups appearing first. If no BackupId or ServerName is specified, the command returns all backups. This is a synchronous operation.
When the backup does not exist, a ResourceNotFoundException is thrown. When request parameters are invalid, a ValidationException is thrown.
If the operation is successful, the service responds with an HTTP 200.
Source: Artsy