Amazon Simple Systems Management Service

2016/06/30 - Amazon Simple Systems Management Service - 8 new 1 updated api methods

CreateActivation (new) Link ¶

Registers your on-premises server or virtual machine with Amazon EC2 so that you can manage these resources using Run Command. An on-premises server or virtual machine that has been registered with EC2 is called a managed instance. For more information about activations, see Setting Up Managed Instances (Linux) or Setting Up Managed Instances (Windows) in the Amazon EC2 User Guide.

Request Syntax

client.create_activation(
    Description='string',
    DefaultInstanceName='string',
    IamRole='string',
    RegistrationLimit=123,
    ExpirationDate=datetime(2015, 1, 1)
)
type Description

string

param Description

A user-defined description of the resource that you want to register with Amazon EC2.

type DefaultInstanceName

string

param DefaultInstanceName

The name of the registered, managed instance as it will appear in the Amazon EC2 console or when you use the AWS command line tools to list EC2 resources.

type IamRole

string

param IamRole

[REQUIRED]

The Amazon Identity and Access Management (IAM) role that you want to assign to the managed instance.

type RegistrationLimit

integer

param RegistrationLimit

Specify the maximum number of managed instances you want to register. The default value is 1 instance.

type ExpirationDate

datetime

param ExpirationDate

The date by which this activation request should expire. The default value is 24 hours.

rtype

dict

returns

Response Syntax

{
    'ActivationId': 'string',
    'ActivationCode': 'string'
}

Response Structure

  • (dict) --

    • ActivationId (string) --

      The ID number generated by the system when it processed the activation. The activation ID functions like a user name.

    • ActivationCode (string) --

      The code the system generates when it processes the activation. The activation code functions like a password to validate the activation ID.

DeleteActivation (new) Link ¶

Deletes an activation. You are not required to delete an activation. If you delete an activation, you can no longer use it to register additional managed instances. Deleting an activation does not de-register managed instances. You must manually de-register managed instances.

Request Syntax

client.delete_activation(
    ActivationId='string'
)
type ActivationId

string

param ActivationId

[REQUIRED]

The ID of the activation that you want to delete.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

UpdateManagedInstanceRole (new) Link ¶

Assigns or changes an Amazon Identity and Access Management (IAM) role to the managed instance.

Request Syntax

client.update_managed_instance_role(
    InstanceId='string',
    IamRole='string'
)
type InstanceId

string

param InstanceId

[REQUIRED]

The ID of the managed instance where you want to update the role.

type IamRole

string

param IamRole

[REQUIRED]

The IAM role you want to assign or change.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

AddTagsToResource (new) Link ¶

Adds or overwrites one or more tags for the specified resource. Tags are metadata that you assign to your managed instances. Tags enable you to categorize your managed instances in different ways, for example, by purpose, owner, or environment. Each tag consists of a key and an optional value, both of which you define. For example, you could define a set of tags for your account's managed instances that helps you track each instance's owner and stack level. For example: Key=Owner and Value=DbAdmin, SysAdmin, or Dev. Or Key=Stack and Value=Production, Pre-Production, or Test. Each resource can have a maximum of 10 tags.

We recommend that you devise a set of tag keys that meets your needs for each resource type. Using a consistent set of tag keys makes it easier for you to manage your resources. You can search and filter the resources based on the tags you add. Tags don't have any semantic meaning to Amazon EC2 and are interpreted strictly as a string of characters.

For more information about tags, see Tagging Your Amazon EC2 Resources in the Amazon EC2 User Guide.

Request Syntax

client.add_tags_to_resource(
    ResourceType='ManagedInstance',
    ResourceId='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type ResourceType

string

param ResourceType

[REQUIRED]

Specifies the type of resource you are tagging.

type ResourceId

string

param ResourceId

[REQUIRED]

The resource ID you want to tag.

type Tags

list

param Tags

[REQUIRED]

One or more tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

  • (dict) --

    Metadata that you assign to your managed instances. Tags enable you to categorize your managed instances in different ways, for example, by purpose, owner, or environment.

    • Key (string) -- [REQUIRED]

      The name of the tag.

    • Value (string) -- [REQUIRED]

      The value of the tag.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DescribeActivations (new) Link ¶

Details about the activation, including: the date and time the activation was created, the expiration date, the IAM role assigned to the instances in the activation, and the number of instances activated by this registration.

Request Syntax

client.describe_activations(
    Filters=[
        {
            'FilterKey': 'ActivationIds'|'DefaultInstanceName'|'IamRole',
            'FilterValues': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
type Filters

list

param Filters

A filter to view information about your activations.

  • (dict) --

    Filter for the DescribeActivation API.

    • FilterKey (string) --

      The name of the filter.

    • FilterValues (list) --

      The filter values.

      • (string) --

type MaxResults

integer

param MaxResults

The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

type NextToken

string

param NextToken

A token to start the list. Use this token to get the next set of results.

rtype

dict

returns

Response Syntax

{
    'ActivationList': [
        {
            'ActivationId': 'string',
            'Description': 'string',
            'DefaultInstanceName': 'string',
            'IamRole': 'string',
            'RegistrationLimit': 123,
            'RegistrationsCount': 123,
            'ExpirationDate': datetime(2015, 1, 1),
            'Expired': True|False,
            'CreatedDate': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ActivationList (list) --

      A list of activations for your AWS account.

      • (dict) --

        An activation registers one or more on-premises servers or virtual machines (VMs) with AWS so that you can configure those servers or VMs using Run Command. A server or VM that has been registered with AWS is called a managed instance.

        • ActivationId (string) --

          The ID created by SSM when you submitted the activation.

        • Description (string) --

          A user defined description of the activation.

        • DefaultInstanceName (string) --

          A name for the managed instance when it is created.

        • IamRole (string) --

          The Amazon Identity and Access Management (IAM) role to assign to the managed instance.

        • RegistrationLimit (integer) --

          The maximum number of managed instances that can be registered using this activation.

        • RegistrationsCount (integer) --

          The number of managed instances already registered with this activation.

        • ExpirationDate (datetime) --

          The date when this activation can no longer be used to register managed instances.

        • Expired (boolean) --

          Whether or not the activation is expired.

        • CreatedDate (datetime) --

          The date the activation was created.

    • NextToken (string) --

      The token for the next set of items to return. Use this token to get the next set of results.

DeregisterManagedInstance (new) Link ¶

Removes the server or virtual machine from the list of registered servers. You can reregister the instance again at any time. If you don’t plan to use Run Command on the server, we suggest uninstalling the SSM agent first.

Request Syntax

client.deregister_managed_instance(
    InstanceId='string'
)
type InstanceId

string

param InstanceId

[REQUIRED]

The ID assigned to the managed instance when you registered it using the activation process.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

RemoveTagsFromResource (new) Link ¶

Removes all tags from the specified resource.

Request Syntax

client.remove_tags_from_resource(
    ResourceType='ManagedInstance',
    ResourceId='string',
    TagKeys=[
        'string',
    ]
)
type ResourceType

string

param ResourceType

[REQUIRED]

The type of resource of which you want to remove a tag.

type ResourceId

string

param ResourceId

[REQUIRED]

The resource ID for which you want to remove tags.

type TagKeys

list

param TagKeys

[REQUIRED]

Tag keys that you want to remove from the specified resource.

  • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ListTagsForResource (new) Link ¶

Returns a list of the tags assigned to the specified resource.

Request Syntax

client.list_tags_for_resource(
    ResourceType='ManagedInstance',
    ResourceId='string'
)
type ResourceType

string

param ResourceType

[REQUIRED]

Returns a list of tags for a specific resource type.

type ResourceId

string

param ResourceId

[REQUIRED]

The resource ID for which you want to see a list of tags.

rtype

dict

returns

Response Syntax

{
    'TagList': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • TagList (list) --

      A list of tags.

      • (dict) --

        Metadata that you assign to your managed instances. Tags enable you to categorize your managed instances in different ways, for example, by purpose, owner, or environment.

        • Key (string) --

          The name of the tag.

        • Value (string) --

          The value of the tag.

DescribeInstanceInformation (updated) Link ¶
Changes (request, response)
Request
{'InstanceInformationFilterList': {'key': {'ActivationIds',
                                           'IamRole',
                                           'ResourceType'}}}
Response
{'InstanceInformationList': {'ActivationId': 'string',
                             'ComputerName': 'string',
                             'IPAddress': 'string',
                             'IamRole': 'string',
                             'Name': 'string',
                             'RegistrationDate': 'timestamp',
                             'ResourceType': 'ManagedInstance | Document | '
                                             'EC2Instance'}}

Describes one or more of your instances. You can use this to get information about instances like the operating system platform, the SSM agent version, status etc. If you specify one or more instance IDs, it returns information for those instances. If you do not specify instance IDs, it returns information for all your instances. If you specify an instance ID that is not valid or an instance that you do not own, you receive an error.

Request Syntax

client.describe_instance_information(
    InstanceInformationFilterList=[
        {
            'key': 'InstanceIds'|'AgentVersion'|'PingStatus'|'PlatformTypes'|'ActivationIds'|'IamRole'|'ResourceType',
            'valueSet': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
type InstanceInformationFilterList

list

param InstanceInformationFilterList

One or more filters. Use a filter to return a more specific list of instances.

  • (dict) --

    Describes a filter for a specific list of instances.

    • key (string) -- [REQUIRED]

      The name of the filter.

    • valueSet (list) -- [REQUIRED]

      The filter values.

      • (string) --

type MaxResults

integer

param MaxResults

The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

type NextToken

string

param NextToken

The token for the next set of items to return. (You received this token from a previous call.)

rtype

dict

returns

Response Syntax

{
    'InstanceInformationList': [
        {
            'InstanceId': 'string',
            'PingStatus': 'Online'|'ConnectionLost'|'Inactive',
            'LastPingDateTime': datetime(2015, 1, 1),
            'AgentVersion': 'string',
            'IsLatestVersion': True|False,
            'PlatformType': 'Windows'|'Linux',
            'PlatformName': 'string',
            'PlatformVersion': 'string',
            'ActivationId': 'string',
            'IamRole': 'string',
            'RegistrationDate': datetime(2015, 1, 1),
            'ResourceType': 'ManagedInstance'|'Document'|'EC2Instance',
            'Name': 'string',
            'IPAddress': 'string',
            'ComputerName': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • InstanceInformationList (list) --

      The instance information list.

      • (dict) --

        Describes a filter for a specific list of instances.

        • InstanceId (string) --

          The instance ID.

        • PingStatus (string) --

          Connection status of the SSM agent.

        • LastPingDateTime (datetime) --

          The date and time when agent last pinged SSM service.

        • AgentVersion (string) --

          The version of the SSM agent running on your instance.

        • IsLatestVersion (boolean) --

          Indicates whether latest version of the SSM agent is running on your instance.

        • PlatformType (string) --

          The operating system platform type.

        • PlatformName (string) --

          The name of the operating system platform running on your instance.

        • PlatformVersion (string) --

          The version of the OS platform running on your instance.

        • ActivationId (string) --

          The activation ID created by SSM when the server or VM was registered.

        • IamRole (string) --

          The Amazon Identity and Access Management (IAM) role assigned to EC2 instances or managed instances.

        • RegistrationDate (datetime) --

          The date the server or VM was registered with AWS as a managed instance.

        • ResourceType (string) --

          The type of instance. Instances are either EC2 instances or managed instances.

        • Name (string) --

          The name of the managed instance.

        • IPAddress (string) --

          The IP address of the managed instance.

        • ComputerName (string) --

          The fully qualified host name of the managed instance.

    • NextToken (string) --

      The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.