activations
Creates, updates, deletes, gets or lists an activations resource.
Overview
| Name | activations |
| Type | Resource |
| Id | aws.ssm.activations |
Fields
The following fields are returned by SELECT queries:
- describe_activations
| Name | Datatype | Description |
|---|---|---|
activation_id | string | The ID created by Systems Manager when you submitted the activation. (pattern: <code>^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$</code>) |
created_date | string (date-time) | The date the activation was created. |
default_instance_name | string | A name for the managed node when it is created. (pattern: <code>^([\p{L}\p{Z}\p{N}_.:/=+-@]*)$</code>) |
description | string | A user defined description of the activation. |
expiration_date | string (date-time) | The date when this activation can no longer be used to register managed nodes. |
expired | boolean | Whether or not the activation is expired. |
iam_role | string | The Identity and Access Management (IAM) role to assign to the managed node. |
registration_limit | integer | The maximum number of managed nodes that can be registered using this activation. |
registrations_count | integer | The number of managed nodes already registered with this activation. |
tags | array | Tags assigned to the activation. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_activations | select | region | Describes details about the activation, such as the date and time the activation was created, its expiration date, the Identity and Access Management (IAM) role assigned to the managed nodes in the activation, and the number of nodes registered by using this activation. | |
create_activation | insert | region, IamRole | Generates an activation code and activation ID you can use to register your on-premises servers, edge devices, or virtual machine (VM) with Amazon Web Services Systems Manager. Registering these machines with Systems Manager makes it possible to manage them using Systems Manager tools. You use the activation code and ID when installing SSM Agent on machines in your hybrid environment. For more information about requirements for managing on-premises machines using Systems Manager, see Using Amazon Web Services Systems Manager in hybrid and multicloud environments in the Amazon Web Services Systems Manager User Guide. Amazon Elastic Compute Cloud (Amazon EC2) instances, edge devices, and on-premises servers and VMs that are configured for Systems Manager are all called managed nodes. | |
delete_activation | delete | region | Deletes an activation. You aren't required to delete an activation. If you delete an activation, you can no longer use it to register additional managed nodes. Deleting an activation doesn't de-register managed nodes. You must manually de-register managed nodes. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_activations
Describes details about the activation, such as the date and time the activation was created, its expiration date, the Identity and Access Management (IAM) role assigned to the managed nodes in the activation, and the number of nodes registered by using this activation.
SELECT
activation_id,
created_date,
default_instance_name,
description,
expiration_date,
expired,
iam_role,
registration_limit,
registrations_count,
tags
FROM aws.ssm.activations
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_activation
- Manifest
Generates an activation code and activation ID you can use to register your on-premises servers, edge devices, or virtual machine (VM) with Amazon Web Services Systems Manager. Registering these machines with Systems Manager makes it possible to manage them using Systems Manager tools. You use the activation code and ID when installing SSM Agent on machines in your hybrid environment. For more information about requirements for managing on-premises machines using Systems Manager, see Using Amazon Web Services Systems Manager in hybrid and multicloud environments in the Amazon Web Services Systems Manager User Guide. Amazon Elastic Compute Cloud (Amazon EC2) instances, edge devices, and on-premises servers and VMs that are configured for Systems Manager are all called managed nodes.
INSERT INTO aws.ssm.activations (
Description,
DefaultInstanceName,
IamRole,
RegistrationLimit,
ExpirationDate,
Tags,
RegistrationMetadata,
region
)
SELECT
'{{ Description }}',
'{{ DefaultInstanceName }}',
'{{ IamRole }}' /* required */,
{{ RegistrationLimit }},
'{{ ExpirationDate }}',
'{{ Tags }}',
'{{ RegistrationMetadata }}',
'{{ region }}'
RETURNING
activation_code,
activation_id
;
# Description fields are for documentation purposes
- name: activations
props:
- name: region
value: "{{ region }}"
description: Required parameter for the activations resource.
- name: Description
value: "{{ Description }}"
description: |
A user-defined description of the resource that you want to register with Systems Manager. Don't enter personally identifiable information in this field.
- name: DefaultInstanceName
value: "{{ DefaultInstanceName }}"
description: |
The name of the registered, managed node as it will appear in the Amazon Web Services Systems Manager console or when you use the Amazon Web Services command line tools to list Systems Manager resources. Don't enter personally identifiable information in this field.
- name: IamRole
value: "{{ IamRole }}"
description: |
The name of the Identity and Access Management (IAM) role that you want to assign to the managed node. This IAM role must provide AssumeRole permissions for the Amazon Web Services Systems Manager service principal ssm.amazonaws.com. For more information, see Create the IAM service role required for Systems Manager in a hybrid and multicloud environments in the Amazon Web Services Systems Manager User Guide. You can't specify an IAM service-linked role for this parameter. You must create a unique role.
- name: RegistrationLimit
value: {{ RegistrationLimit }}
description: |
Specify the maximum number of managed nodes you want to register. The default value is 1.
- name: ExpirationDate
value: "{{ ExpirationDate }}"
description: |
The date by which this activation request should expire, in timestamp format, such as "2024-07-07T00:00:00". You can specify a date up to 30 days in advance. If you don't provide an expiration date, the activation code expires in 24 hours.
- name: Tags
description: |
Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an activation to identify which servers or virtual machines (VMs) in your on-premises environment you intend to activate. In this case, you could specify the following key-value pairs: Key=OS,Value=Windows Key=Environment,Value=Production When you install SSM Agent on your on-premises servers and VMs, you specify an activation ID and code. When you specify the activation ID and code, tags assigned to the activation are automatically applied to the on-premises servers or VMs. You can't add tags to or delete tags from an existing activation. You can tag your on-premises servers, edge devices, and VMs after they connect to Systems Manager for the first time and are assigned a managed node ID. This means they are listed in the Amazon Web Services Systems Manager console with an ID that is prefixed with "mi-". For information about how to add tags to your managed nodes, see AddTagsToResource. For information about how to remove tags from your managed nodes, see RemoveTagsFromResource.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: RegistrationMetadata
description: |
Reserved for internal use.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
DELETE examples
- delete_activation
Deletes an activation. You aren't required to delete an activation. If you delete an activation, you can no longer use it to register additional managed nodes. Deleting an activation doesn't de-register managed nodes. You must manually de-register managed nodes.
DELETE FROM aws.ssm.activations
WHERE region = '{{ region }}' --required
;