Skip to content

update_package_configuration

update_package_configuration(
    *,
    config_overrides: Optional[IoTClientConfig] = None,
    version_update_by_jobs_config: Optional[VersionUpdateByJobsConfig] = None,
    client_token: Optional[ClientToken] = None,
) -> UpdatePackageConfigurationResponse

Updates the software package configuration.

Requires permission to access the UpdatePackageConfiguration and iam:PassRole actions.

Parameters:

  • version_update_by_jobs_config (Optional[VersionUpdateByJobsConfig], default: None ) –

    Configuration to manage job's package version reporting. This updates the thing's reserved named shadow that the job targets.

  • client_token (Optional[ClientToken], default: None ) –

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

Raises:

Source code in docs_src/capo_iot/_services/io_t.py
def update_package_configuration(
    self,
    *,
    config_overrides: Optional[IoTClientConfig] = None,
    version_update_by_jobs_config: Optional[
        "capo_iot.types.version_update_by_jobs_config.VersionUpdateByJobsConfig"
    ] = None,
    client_token: Optional["capo_iot.types.client_token.ClientToken"] = None,
) -> "capo_iot.types.update_package_configuration_response.UpdatePackageConfigurationResponse":
    """<p>Updates the software package configuration.</p> <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">UpdatePackageConfiguration</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html">iam:PassRole</a> actions.</p>

    Args:
        version_update_by_jobs_config: <p>Configuration to manage job's package version reporting. This updates the thing's reserved named shadow that the job targets.</p>
        client_token: <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>

    Raises:
        capo_iot.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
        capo_iot.errors.internal_server_exception.InternalServerException: <p>Internal error from the service that indicates an unexpected error or that the service is unavailable.</p>
        capo_iot.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
        capo_iot.errors.validation_exception.ValidationException: <p>The request is not valid.</p>
        capo_iot.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_iot.types.update_package_configuration_request.UpdatePackageConfigurationRequest]",
    ) -> OperationResponse[
        "capo_iot.types.update_package_configuration_response.UpdatePackageConfigurationResponse"
    ]:
        import capo_iot._operations.aws_iot_service.update_package_configuration

        output, http_response = (
            capo_iot._operations.aws_iot_service.update_package_configuration.update_package_configuration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdatePackageConfiguration")
    )
    input_: capo_iot.types.update_package_configuration_request.UpdatePackageConfigurationRequest = {}
    if version_update_by_jobs_config is not None:
        input_["version_update_by_jobs_config"] = version_update_by_jobs_config
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output