Skip to content

describe_workload

describe_workload(
    resource_group_name: ResourceGroupName,
    component_name: ComponentName,
    workload_id: WorkloadId,
    *,
    config_overrides: Optional[ApplicationInsightsClientConfig] = None,
    account_id: Optional[AccountId] = None,
) -> DescribeWorkloadResponse

Describes a workload and its configuration.

Parameters:

  • resource_group_name (ResourceGroupName) –

    The name of the resource group.

  • component_name (ComponentName) –

    The name of the component.

  • workload_id (WorkloadId) –

    The ID of the workload.

  • account_id (Optional[AccountId], default: None ) –

    The Amazon Web Services account ID for the workload owner.

Raises:

Source code in docs_src/capo_application_insights/_services/application_insights.py
def describe_workload(
    self,
    resource_group_name: "capo_application_insights.types.resource_group_name.ResourceGroupName",
    component_name: "capo_application_insights.types.component_name.ComponentName",
    workload_id: "capo_application_insights.types.workload_id.WorkloadId",
    *,
    config_overrides: Optional[ApplicationInsightsClientConfig] = None,
    account_id: Optional[
        "capo_application_insights.types.account_id.AccountId"
    ] = None,
) -> "capo_application_insights.types.describe_workload_response.DescribeWorkloadResponse":
    """<p>Describes a workload and its configuration.</p>

    Args:
        resource_group_name: <p>The name of the resource group.</p>
        component_name: <p>The name of the component.</p>
        workload_id: <p>The ID of the workload.</p>
        account_id: <p>The Amazon Web Services account ID for the workload owner.</p>

    Raises:
        capo_application_insights.errors.internal_server_exception.InternalServerException: <p>The server encountered an internal error and is unable to complete the request.</p>
        capo_application_insights.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource does not exist in the customer account.</p>
        capo_application_insights.errors.validation_exception.ValidationException: <p>The parameter is not valid.</p>
        capo_application_insights.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_application_insights.types.describe_workload_request.DescribeWorkloadRequest]",
    ) -> OperationResponse[
        "capo_application_insights.types.describe_workload_response.DescribeWorkloadResponse"
    ]:
        import capo_application_insights._operations.ec2_windows_barley_service.describe_workload

        output, http_response = (
            capo_application_insights._operations.ec2_windows_barley_service.describe_workload.describe_workload(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeWorkload")
    )
    input_: capo_application_insights.types.describe_workload_request.DescribeWorkloadRequest = {
        "resource_group_name": resource_group_name,
        "component_name": component_name,
        "workload_id": workload_id,
    }
    if account_id is not None:
        input_["account_id"] = account_id

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