Greengrass / Client / create_subscription_definition
create_subscription_definition#
- Greengrass.Client.create_subscription_definition(**kwargs)#
Creates a subscription definition. You may provide the initial version of the subscription definition now or use ‘’CreateSubscriptionDefinitionVersion’’ at a later time.
See also: AWS API Documentation
Request Syntax
response = client.create_subscription_definition( AmznClientToken='string', InitialVersion={ 'Subscriptions': [ { 'Id': 'string', 'Source': 'string', 'Subject': 'string', 'Target': 'string' }, ] }, Name='string', tags={ 'string': 'string' } )
- Parameters:
AmznClientToken (string) – A client token used to correlate requests and responses.
InitialVersion (dict) –
Information about the initial version of the subscription definition.
Subscriptions (list) – A list of subscriptions.
(dict) – Information about a subscription.
Id (string) – [REQUIRED] A descriptive or arbitrary ID for the subscription. This value must be unique within the subscription definition version. Max length is 128 characters with pattern ‘’[a-zA-Z0-9:_-]+’’.
Source (string) – [REQUIRED] The source of the subscription. Can be a thing ARN, a Lambda function ARN, a connector ARN, ‘cloud’ (which represents the AWS IoT cloud), or ‘GGShadowService’.
Subject (string) – [REQUIRED] The MQTT topic used to route the message.
Target (string) – [REQUIRED] Where the message is sent to. Can be a thing ARN, a Lambda function ARN, a connector ARN, ‘cloud’ (which represents the AWS IoT cloud), or ‘GGShadowService’.
Name (string) – The name of the subscription definition.
tags (dict) –
Tag(s) to add to the new resource.
(string) –
(string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Id': 'string', 'LastUpdatedTimestamp': 'string', 'LatestVersion': 'string', 'LatestVersionArn': 'string', 'Name': 'string' }
Response Structure
(dict) –
Arn (string) – The ARN of the definition.
CreationTimestamp (string) – The time, in milliseconds since the epoch, when the definition was created.
Id (string) – The ID of the definition.
LastUpdatedTimestamp (string) – The time, in milliseconds since the epoch, when the definition was last updated.
LatestVersion (string) – The ID of the latest version associated with the definition.
LatestVersionArn (string) – The ARN of the latest version associated with the definition.
Name (string) – The name of the definition.
Exceptions