Skip to content

get_associated_resource

get_associated_resource(
    application: ApplicationSpecifier,
    resource_type: ResourceType,
    resource: ResourceSpecifier,
    *,
    config_overrides: Optional[ServiceCatalogAppRegistryClientConfig] = None,
    next_token: Optional[NextToken] = None,
    resource_tag_status: Optional[GetAssociatedResourceFilter] = None,
    max_results: Optional[MaxResults] = None,
) -> GetAssociatedResourceResponse

Gets the resource associated with the application.

Parameters:

  • application (ApplicationSpecifier) –

    The name, ID, or ARN of the application.

  • resource_type (ResourceType) –

    The type of resource associated with the application.

  • resource (ResourceSpecifier) –

    The name or ID of the resource associated with the application.

  • next_token (Optional[NextToken], default: None ) –

    A unique pagination token for each page of results. Make the call again with the returned token to retrieve the next page of results.

  • resource_tag_status (Optional[GetAssociatedResourceFilter], default: None ) –

    States whether an application tag is applied, not applied, in the process of being applied, or skipped.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of results to return. If the parameter is omitted, it defaults to 25. The value is optional.

Raises:

Source code in docs_src/capo_service_catalog_appregistry/_services/service_catalog_app_registry.py
def get_associated_resource(
    self,
    application: "capo_service_catalog_appregistry.types.application_specifier.ApplicationSpecifier",
    resource_type: "capo_service_catalog_appregistry.types.resource_type.ResourceType",
    resource: "capo_service_catalog_appregistry.types.resource_specifier.ResourceSpecifier",
    *,
    config_overrides: Optional[ServiceCatalogAppRegistryClientConfig] = None,
    next_token: Optional[
        "capo_service_catalog_appregistry.types.next_token.NextToken"
    ] = None,
    resource_tag_status: Optional[
        "capo_service_catalog_appregistry.types.get_associated_resource_filter.GetAssociatedResourceFilter"
    ] = None,
    max_results: Optional[
        "capo_service_catalog_appregistry.types.max_results.MaxResults"
    ] = None,
) -> "capo_service_catalog_appregistry.types.get_associated_resource_response.GetAssociatedResourceResponse":
    """<p>Gets the resource associated with the application.</p>

    Args:
        application: <p> The name, ID, or ARN of the application. </p>
        resource_type: <p>The type of resource associated with the application.</p>
        resource: <p>The name or ID of the resource associated with the application.</p>
        next_token: <p> A unique pagination token for each page of results. Make the call again with the returned token to retrieve the next page of results. </p>
        resource_tag_status: <p> States whether an application tag is applied, not applied, in the process of being applied, or skipped. </p>
        max_results: <p> The maximum number of results to return. If the parameter is omitted, it defaults to 25. The value is optional. </p>

    Raises:
        capo_service_catalog_appregistry.errors.internal_server_exception.InternalServerException: <p>The service is experiencing internal problems.</p>
        capo_service_catalog_appregistry.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_service_catalog_appregistry.errors.validation_exception.ValidationException: <p>The request has invalid or missing parameters.</p>
        capo_service_catalog_appregistry.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_service_catalog_appregistry.types.get_associated_resource_request.GetAssociatedResourceRequest]",
    ) -> OperationResponse[
        "capo_service_catalog_appregistry.types.get_associated_resource_response.GetAssociatedResourceResponse"
    ]:
        import capo_service_catalog_appregistry._operations.aws242_app_registry.get_associated_resource

        output, http_response = (
            capo_service_catalog_appregistry._operations.aws242_app_registry.get_associated_resource.get_associated_resource(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetAssociatedResource")
    )
    input_: capo_service_catalog_appregistry.types.get_associated_resource_request.GetAssociatedResourceRequest = {
        "application": application,
        "resource_type": resource_type,
        "resource": resource,
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if resource_tag_status is not None:
        input_["resource_tag_status"] = resource_tag_status
    if max_results is not None:
        input_["max_results"] = max_results

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