create_deployment
async
¶
create_deployment(
target_arn: TargetARN,
*,
config_overrides: Optional[AsyncGreengrassV2ClientConfig] = None,
deployment_name: Optional[DeploymentNameString] = None,
components: Optional[ComponentDeploymentSpecifications] = None,
iot_job_configuration: Optional[DeploymentIoTJobConfiguration] = None,
deployment_policies: Optional[DeploymentPolicies] = None,
parent_target_arn: Optional[ThingGroupARN] = None,
tags: Optional[TagMap] = None,
client_token: Optional[ClientTokenString] = None,
) -> CreateDeploymentResponse
Creates a continuous deployment for a target, which is a Greengrass core device or group of core devices. When you add a new core device to a group of core devices that has a deployment, IoT Greengrass deploys that group's deployment to the new device.
You can define one deployment for each target. When you create a new deployment for a target that has an existing deployment, you replace the previous deployment. IoT Greengrass applies the new deployment to the target devices.
Every deployment has a revision number that indicates how many deployment revisions you define for a target. Use this operation to create a new revision of an existing deployment.
For more information, see the Create deployments in the IoT Greengrass V2 Developer Guide.
Parameters:
-
target_arn(TargetARN) –The ARN of the target IoT thing or thing group. When creating a subdeployment, the targetARN can only be a thing group.
-
deployment_name(Optional[DeploymentNameString], default:None) –The name of the deployment.
-
components(Optional[ComponentDeploymentSpecifications], default:None) –The components to deploy. This is a dictionary, where each key is the name of a component, and each key's value is the version and configuration to deploy for that component.
-
iot_job_configuration(Optional[DeploymentIoTJobConfiguration], default:None) –The job configuration for the deployment configuration. The job configuration specifies the rollout, timeout, and stop configurations for the deployment configuration.
-
deployment_policies(Optional[DeploymentPolicies], default:None) –The deployment policies for the deployment. These policies define how the deployment updates components and handles failure.
-
parent_target_arn(Optional[ThingGroupARN], default:None) –The parent deployment's target ARN within a subdeployment.
-
tags(Optional[TagMap], default:None) –A list of key-value pairs that contain metadata for the resource. For more information, see Tag your resources in the IoT Greengrass V2 Developer Guide.
-
client_token(Optional[ClientTokenString], default:None) –A unique, case-sensitive identifier that you can provide to ensure that the request is idempotent. Idempotency means that the request is successfully processed only once, even if you send the request multiple times. When a request succeeds, and you specify the same client token for subsequent successful requests, the IoT Greengrass V2 service returns the successful response that it caches from the previous request. IoT Greengrass V2 caches successful responses for idempotent requests for up to 8 hours.
Raises:
-
AccessDeniedException–You don't have permission to perform the action.
-
ConflictException–Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.
-
InternalServerException–IoT Greengrass can't process your request right now. Try again later.
-
RequestAlreadyInProgressException–The request is already in progress. This exception occurs when you use a client token for multiple requests while IoT Greengrass is still processing an earlier request that uses the same client token.
-
ResourceNotFoundException–The requested resource can't be found.
-
ThrottlingException–Your request exceeded a request rate quota. For example, you might have exceeded the amount of times that you can retrieve device or deployment status per second.
-
ValidationException–The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_greengrassv2/_services/async_greengrass_v2.py
524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 | |