Skip to content

update_workload async

update_workload(
    workload_id: WorkloadId,
    *,
    config_overrides: Optional[AsyncWellArchitectedClientConfig] = None,
    workload_name: Optional[WorkloadName] = None,
    description: Optional[WorkloadDescription] = None,
    environment: Optional[WorkloadEnvironment] = None,
    account_ids: Optional[WorkloadAccountIds] = None,
    aws_regions: Optional[WorkloadAwsRegions] = None,
    non_aws_regions: Optional[WorkloadNonAwsRegions] = None,
    pillar_priorities: Optional[WorkloadPillarPriorities] = None,
    architectural_design: Optional[WorkloadArchitecturalDesign] = None,
    review_owner: Optional[WorkloadReviewOwner] = None,
    is_review_owner_update_acknowledged: Optional[
        IsReviewOwnerUpdateAcknowledged
    ] = None,
    industry_type: Optional[WorkloadIndustryType] = None,
    industry: Optional[WorkloadIndustry] = None,
    notes: Optional[Notes] = None,
    improvement_status: Optional[WorkloadImprovementStatus] = None,
    discovery_config: Optional[WorkloadDiscoveryConfig] = None,
    applications: Optional[WorkloadApplications] = None,
    jira_configuration: Optional[WorkloadJiraConfigurationInput] = None,
) -> UpdateWorkloadOutput

Update an existing workload.

Parameters:

  • is_review_owner_update_acknowledged (Optional[IsReviewOwnerUpdateAcknowledged], default: None ) –

    Flag indicating whether the workload owner has acknowledged that the Review owner field is required.

    If a Review owner is not added to the workload within 60 days of acknowledgement, access to the workload is restricted until an owner is added.

  • discovery_config (Optional[WorkloadDiscoveryConfig], default: None ) –

    Well-Architected discovery configuration settings to associate to the workload.

  • applications (Optional[WorkloadApplications], default: None ) –

    List of AppRegistry application ARNs to associate to the workload.

  • jira_configuration (Optional[WorkloadJiraConfigurationInput], default: None ) –

    Configuration of the Jira integration.

Raises:

Source code in docs_src/capo_wellarchitected/_services/async_well_architected.py
async def update_workload(
    self,
    workload_id: "capo_wellarchitected.types.workload_id.WorkloadId",
    *,
    config_overrides: Optional[AsyncWellArchitectedClientConfig] = None,
    workload_name: Optional[
        "capo_wellarchitected.types.workload_name.WorkloadName"
    ] = None,
    description: Optional[
        "capo_wellarchitected.types.workload_description.WorkloadDescription"
    ] = None,
    environment: Optional[
        "capo_wellarchitected.types.workload_environment.WorkloadEnvironment"
    ] = None,
    account_ids: Optional[
        "capo_wellarchitected.types.workload_account_ids.WorkloadAccountIds"
    ] = None,
    aws_regions: Optional[
        "capo_wellarchitected.types.workload_aws_regions.WorkloadAwsRegions"
    ] = None,
    non_aws_regions: Optional[
        "capo_wellarchitected.types.workload_non_aws_regions.WorkloadNonAwsRegions"
    ] = None,
    pillar_priorities: Optional[
        "capo_wellarchitected.types.workload_pillar_priorities.WorkloadPillarPriorities"
    ] = None,
    architectural_design: Optional[
        "capo_wellarchitected.types.workload_architectural_design.WorkloadArchitecturalDesign"
    ] = None,
    review_owner: Optional[
        "capo_wellarchitected.types.workload_review_owner.WorkloadReviewOwner"
    ] = None,
    is_review_owner_update_acknowledged: Optional[
        "capo_wellarchitected.types.is_review_owner_update_acknowledged.IsReviewOwnerUpdateAcknowledged"
    ] = None,
    industry_type: Optional[
        "capo_wellarchitected.types.workload_industry_type.WorkloadIndustryType"
    ] = None,
    industry: Optional[
        "capo_wellarchitected.types.workload_industry.WorkloadIndustry"
    ] = None,
    notes: Optional["capo_wellarchitected.types.notes.Notes"] = None,
    improvement_status: Optional[
        "capo_wellarchitected.types.workload_improvement_status.WorkloadImprovementStatus"
    ] = None,
    discovery_config: Optional[
        "capo_wellarchitected.types.workload_discovery_config.WorkloadDiscoveryConfig"
    ] = None,
    applications: Optional[
        "capo_wellarchitected.types.workload_applications.WorkloadApplications"
    ] = None,
    jira_configuration: Optional[
        "capo_wellarchitected.types.workload_jira_configuration_input.WorkloadJiraConfigurationInput"
    ] = None,
) -> "capo_wellarchitected.types.update_workload_output.UpdateWorkloadOutput":
    """<p>Update an existing workload.</p>

    Args:
        is_review_owner_update_acknowledged: <p>Flag indicating whether the workload owner has acknowledged that the <i>Review owner</i> field is required.</p> <p>If a <b>Review owner</b> is not added to the workload within 60 days of acknowledgement, access to the workload is restricted until an owner is added.</p>
        discovery_config: <p>Well-Architected discovery configuration settings to associate to the workload.</p>
        applications: <p>List of AppRegistry application ARNs to associate to the workload.</p>
        jira_configuration: <p>Configuration of the Jira integration.</p>

    Raises:
        capo_wellarchitected.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_wellarchitected.errors.conflict_exception.ConflictException: <p>The resource has already been processed, was deleted, or is too large.</p>
        capo_wellarchitected.errors.internal_server_exception.InternalServerException: <p>There is a problem with the Well-Architected Tool API service.</p>
        capo_wellarchitected.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</p>
        capo_wellarchitected.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
        capo_wellarchitected.errors.validation_exception.ValidationException: <p>The user input is not valid.</p>
        capo_wellarchitected.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_wellarchitected.types.update_workload_input.UpdateWorkloadInput]",
    ) -> AsyncOperationResponse[
        "capo_wellarchitected.types.update_workload_output.UpdateWorkloadOutput"
    ]:
        import capo_wellarchitected._operations.well_architected_api_service_lambda.update_workload

        (
            output,
            http_response,
        ) = await capo_wellarchitected._operations.well_architected_api_service_lambda.update_workload.async_update_workload(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateWorkload")
    )
    input_: capo_wellarchitected.types.update_workload_input.UpdateWorkloadInput = {
        "workload_id": workload_id
    }
    if workload_name is not None:
        input_["workload_name"] = workload_name
    if description is not None:
        input_["description"] = description
    if environment is not None:
        input_["environment"] = environment
    if account_ids is not None:
        input_["account_ids"] = account_ids
    if aws_regions is not None:
        input_["aws_regions"] = aws_regions
    if non_aws_regions is not None:
        input_["non_aws_regions"] = non_aws_regions
    if pillar_priorities is not None:
        input_["pillar_priorities"] = pillar_priorities
    if architectural_design is not None:
        input_["architectural_design"] = architectural_design
    if review_owner is not None:
        input_["review_owner"] = review_owner
    if is_review_owner_update_acknowledged is not None:
        input_["is_review_owner_update_acknowledged"] = (
            is_review_owner_update_acknowledged
        )
    if industry_type is not None:
        input_["industry_type"] = industry_type
    if industry is not None:
        input_["industry"] = industry
    if notes is not None:
        input_["notes"] = notes
    if improvement_status is not None:
        input_["improvement_status"] = improvement_status
    if discovery_config is not None:
        input_["discovery_config"] = discovery_config
    if applications is not None:
        input_["applications"] = applications
    if jira_configuration is not None:
        input_["jira_configuration"] = jira_configuration

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output