Menu
AWS Greengrass
API Reference

CreateSubscriptionDefinition

Creates a subscription definition. You may optionally provide the initial version of the subscription definition or use CreateSubscriptionDefinitionVersion at a later time.

URI: /greengrass/definition/subscriptions

Operation: POST

Produces: application/json

Parameters:

  • CreateSubscriptionDefinitionRequestBody

    Information needed to create a subscription definition.

    where used: body

    required: true

    schema:

    properties:

    • Name:

      The name of the subscription definition.

      type: string

    • InitialVersion:

      Information about the initial version of the subscription definition.

      SubscriptionDefinitionVersion

      type: object

      Information about a subscription definition version.

      properties:

      • Subscriptions

        A list of subscriptions in the version.

        type: array

        items:
        Subscription

        type: object

        Information about a subscription.

        required: Id|Source|Subject|Target

        properties:

        • Id:

          The id of the subscription.

          type: string

        • Source:

          The source of the subscription. Can be a thing arn, lambda arn or the word 'cloud'.

          type: string

        • Subject:

          The subject of the message.

          type: string

        • Target:

          Where the message is sent to. Can be a thing arn, lambda arn or the word 'cloud'.

          type: string

    Example:

    Copy
    { "Name": "string", "InitialVersion": { "Subscriptions": [ { "Id": "string", "Source": "string", "Subject": "string", "Target": "string" } ] } }
  • X-Amzn-Client-Token

    A client token used to correlate requests and responses.

    where used: header

    required: false

    type: string

Responses: