Menu
AWS Migration Hub
User Guide

PutResourceAttributes

Provides identifying details of the resource being migrated so that it can be associated in the Application Discovery Service (ADS)'s repository. This association occurs asynchronously after PutResourceAttributes returns.

Important

Keep in mind that subsequent calls to PutResourceAttributes will override previously stored attributes. For example, if it is first called with a MAC address, but later, it is desired to add an IP address, it will then be required to call it with both the IP and MAC addresses to prevent overiding the MAC address.

Note

Because this is an asynchronous call, it will always return 200, whether an association occurs or not. To confirm if an association was found based on the provided details, call ListAssociatedResource.

Request Syntax

{
   "DryRun": boolean,
   "MigrationTaskName": "string",
   "ProgressUpdateStream": "string",
   "ResourceAttributeList": [ 
      { 
         "Type": "string",
         "Value": "string"
      }
   ]
}

Request Parameters

The request accepts the following data in JSON format.

DryRun

Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.

Type: Boolean

Required: No

MigrationTaskName

Unique identifier that references the migration task.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: [^:|]+

Required: Yes

ProgressUpdateStream

The name of the ProgressUpdateStream.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 50.

Pattern: [^/:|\000-\037]+

Required: Yes

ResourceAttributeList

Information about the resource that is being migrated. This data will be used to map the task to a resource in the Application Discovery Service (ADS)'s repository.

Type: Array of ResourceAttribute objects

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 400

DryRunOperation

Exception raised to indicate a successfully authorized action when the DryRun flag is set to "true".

HTTP Status Code: 400

InternalServerError

Exception raised when there is an internal, configuration, or dependency error encountered.

HTTP Status Code: 500

InvalidInputException

Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.

HTTP Status Code: 400

ResourceNotFoundException

Exception raised when the request references a resource (ADS configuration, update stream, migration task, etc.) that does not exist in ADS (Application Discovery Service) or in Migration Hub's repository.

HTTP Status Code: 400

ServiceUnavailableException

Exception raised when there is an internal, configuration, or dependency error encountered.

HTTP Status Code: 500

UnauthorizedOperation

Exception raised to indicate a request was not authorized when the DryRun flag is set to "true".

HTTP Status Code: 400

Example

Put migration resource attributes to associate with resource in repository

The following example sends identifying details of the resource being migrated so that it can be associated with a resource in the Application Discovery Service's repository using the values passed to the required parameters MigrationTaskName and ProgressUpdateStream to tag the correct target and its migration tool. The ResourceAttributeList parameter is also required to define the resource type and its identifying value.

The resource Type is restricted to one of the following values: IPV4_ADDRESS | IPV6_ADDRESS | MAC_ADDRESS | FQDN | VM_MANAGER_ID | VM_MANAGED_OBJECT_REFERENCE | BIOS_ID | MOTHERBOARD_SERIAL_NUMBER | LABEL, and the identifying Value can be a string up to 256 characters.

Sample Request


{
   "MigrationTaskName": "sms-12de3cf1a",
   "ProgressUpdateStream": "SMS",
   "ResourceAttributeList": [ 
      { 
         "Type": "MAC_ADDRESS",
         "Value": "06:D0:05:72:FF:A9"
      }
   ]
}

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: