create_system_instance

IoTThingsGraph.Client.create_system_instance(**kwargs)

Creates a system instance.

This action validates the system instance, prepares the deployment-related resources. For Greengrass deployments, it updates the Greengrass group that is specified by the greengrassGroupName parameter. It also adds a file to the S3 bucket specified by the s3BucketName parameter. You need to call DeploySystemInstance after running this action.

For Greengrass deployments, since this action modifies and adds resources to a Greengrass group and an S3 bucket on the caller's behalf, the calling identity must have write permissions to both the specified Greengrass group and S3 bucket. Otherwise, the call will fail with an authorization error.

For cloud deployments, this action requires a flowActionsRoleArn value. This is an IAM role that has permissions to access AWS services, such as AWS Lambda and AWS IoT, that the flow uses when it executes.

If the definition document doesn't specify a version of the user's namespace, the latest version will be used by default.

Danger

This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.

See also: AWS API Documentation

Request Syntax

response = client.create_system_instance(
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    definition={
        'language': 'GRAPHQL',
        'text': 'string'
    },
    target='GREENGRASS'|'CLOUD',
    greengrassGroupName='string',
    s3BucketName='string',
    metricsConfiguration={
        'cloudMetricEnabled': True|False,
        'metricRuleRoleArn': 'string'
    },
    flowActionsRoleArn='string'
)
Parameters
  • tags (list) --

    Metadata, consisting of key-value pairs, that can be used to categorize your system instances.

    • (dict) --

      Metadata assigned to an AWS IoT Things Graph resource consisting of a key-value pair.

      • key (string) -- [REQUIRED]

        The required name of the tag. The string value can be from 1 to 128 Unicode characters in length.

      • value (string) -- [REQUIRED]

        The optional value of the tag. The string value can be from 1 to 256 Unicode characters in length.

  • definition (dict) --

    [REQUIRED]

    A document that defines an entity.

    • language (string) -- [REQUIRED]

      The language used to define the entity. GRAPHQL is the only valid value.

    • text (string) -- [REQUIRED]

      The GraphQL text that defines the entity.

  • target (string) --

    [REQUIRED]

    The target type of the deployment. Valid values are GREENGRASS and CLOUD .

  • greengrassGroupName (string) -- The name of the Greengrass group where the system instance will be deployed. This value is required if the value of the target parameter is GREENGRASS .
  • s3BucketName (string) -- The name of the Amazon Simple Storage Service bucket that will be used to store and deploy the system instance's resource file. This value is required if the value of the target parameter is GREENGRASS .
  • metricsConfiguration (dict) --

    An object that specifies whether cloud metrics are collected in a deployment and, if so, what role is used to collect metrics.

    • cloudMetricEnabled (boolean) --

      A Boolean that specifies whether cloud metrics are collected.

    • metricRuleRoleArn (string) --

      The ARN of the role that is used to collect cloud metrics.

  • flowActionsRoleArn (string) -- The ARN of the IAM role that AWS IoT Things Graph will assume when it executes the flow. This role must have read and write access to AWS Lambda and AWS IoT and any other AWS services that the flow uses when it executes. This value is required if the value of the target parameter is CLOUD .
Return type

dict

Returns

Response Syntax

{
    'summary': {
        'id': 'string',
        'arn': 'string',
        'status': 'NOT_DEPLOYED'|'BOOTSTRAP'|'DEPLOY_IN_PROGRESS'|'DEPLOYED_IN_TARGET'|'UNDEPLOY_IN_PROGRESS'|'FAILED'|'PENDING_DELETE'|'DELETED_IN_TARGET',
        'target': 'GREENGRASS'|'CLOUD',
        'greengrassGroupName': 'string',
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'greengrassGroupId': 'string',
        'greengrassGroupVersionId': 'string'
    }
}

Response Structure

  • (dict) --

    • summary (dict) --

      The summary object that describes the new system instance.

      • id (string) --

        The ID of the system instance.

      • arn (string) --

        The ARN of the system instance.

      • status (string) --

        The status of the system instance.

      • target (string) --

        The target of the system instance.

      • greengrassGroupName (string) --

        The ID of the Greengrass group where the system instance is deployed.

      • createdAt (datetime) --

        The date when the system instance was created.

      • updatedAt (datetime) --

        The date and time when the system instance was last updated.

      • greengrassGroupId (string) --

        The ID of the Greengrass group where the system instance is deployed.

      • greengrassGroupVersionId (string) --

        The version of the Greengrass group where the system instance is deployed.

Exceptions

  • IoTThingsGraph.Client.exceptions.InvalidRequestException
  • IoTThingsGraph.Client.exceptions.ResourceAlreadyExistsException
  • IoTThingsGraph.Client.exceptions.ThrottlingException
  • IoTThingsGraph.Client.exceptions.InternalFailureException
  • IoTThingsGraph.Client.exceptions.LimitExceededException