Skip to content

update_portal async

update_portal(
    portal_id: PortalId,
    *,
    config_overrides: Optional[AsyncAPIPortalClientConfig] = None,
    portal_content: Optional[PortalContent] = None,
    endpoint_configuration: Optional[EndpointConfigurationRequest] = None,
    authorization: Optional[Authorization] = None,
    rum_app_monitor_name: Optional[RUMAppMonitorName] = None,
    included_product_arns: Optional[IncludedProductArns] = None,
    logo_uri: Optional[LogoUri] = None,
) -> UpdatePortalResponse

Updates a portal. Only the fields supplied in the request are changed.

Parameters:

  • portal_id (PortalId) –

    The identifier of the portal.

  • portal_content (Optional[PortalContent], default: None ) –

    The new display name, description, and theme. Omit it to keep the current values.

  • authorization (Optional[Authorization], default: None ) –

    The new authorization settings. Omit it to keep the current settings.

  • rum_app_monitor_name (Optional[RUMAppMonitorName], default: None ) –

    The new CloudWatch RUM app monitor name. Omit it to keep the current value.

  • included_product_arns (Optional[IncludedProductArns], default: None ) –

    The new list of product ARNs, up to 200. It replaces the current list. Omit it to keep the current list.

  • logo_uri (Optional[LogoUri], default: None ) –

    The new S3 location of the portal logo, in the form s3://bucket/key. An empty string removes the logo. Omit it to keep the current logo.

Raises:

  • AccessDeniedException –

    You do not have permission to perform this operation.

  • BadRequestException –

    The request is not valid. The message identifies the field or value that failed validation.

  • ConflictException –

    The request conflicts with the current state of the resource, for example because another operation on it is still in progress.

  • LimitExceededException –

    The request rate or a service quota was exceeded. Reduce the request rate or the number of resources and try again.

  • ResourceNotFoundException –

    The requested resource does not exist, or you do not have access to it.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_apiportal/_services/async_api_portal.py
async def update_portal(
    self,
    portal_id: "capo_apiportal.types.portal_id.PortalId",
    *,
    config_overrides: Optional[AsyncAPIPortalClientConfig] = None,
    portal_content: Optional[
        "capo_apiportal.types.portal_content.PortalContent"
    ] = None,
    endpoint_configuration: Optional[
        "capo_apiportal.types.endpoint_configuration_request.EndpointConfigurationRequest"
    ] = None,
    authorization: Optional[
        "capo_apiportal.types.authorization.Authorization"
    ] = None,
    rum_app_monitor_name: Optional[
        "capo_apiportal.types.rum_app_monitor_name.RUMAppMonitorName"
    ] = None,
    included_product_arns: Optional[
        "capo_apiportal.types.included_product_arns.IncludedProductArns"
    ] = None,
    logo_uri: Optional["capo_apiportal.types.logo_uri.LogoUri"] = None,
) -> "capo_apiportal.types.update_portal_response.UpdatePortalResponse":
    """Updates a portal. Only the fields supplied in the request are changed.

    Args:
        portal_id: The identifier of the portal.
        portal_content: The new display name, description, and theme. Omit it to keep the current values.
        authorization: The new authorization settings. Omit it to keep the current settings.
        rum_app_monitor_name: The new CloudWatch RUM app monitor name. Omit it to keep the current value.
        included_product_arns: The new list of product ARNs, up to 200. It replaces the current list. Omit it to keep the current list.
        logo_uri: The new S3 location of the portal logo, in the form `s3://bucket/key`. An empty string removes the logo. Omit it to keep the current logo.

    Raises:
        capo_apiportal.errors.access_denied_exception.AccessDeniedException: You do not have permission to perform this operation.
        capo_apiportal.errors.bad_request_exception.BadRequestException: The request is not valid. The message identifies the field or value that failed validation.
        capo_apiportal.errors.conflict_exception.ConflictException: The request conflicts with the current state of the resource, for example because another operation on it is still in progress.
        capo_apiportal.errors.limit_exceeded_exception.LimitExceededException: The request rate or a service quota was exceeded. Reduce the request rate or the number of resources and try again.
        capo_apiportal.errors.resource_not_found_exception.ResourceNotFoundException: The requested resource does not exist, or you do not have access to it.
        capo_apiportal.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_apiportal.types.update_portal_request.UpdatePortalRequest]",
    ) -> AsyncOperationResponse[
        "capo_apiportal.types.update_portal_response.UpdatePortalResponse"
    ]:
        import capo_apiportal._operations.api_portal_control_service.update_portal

        (
            output,
            http_response,
        ) = await capo_apiportal._operations.api_portal_control_service.update_portal.async_update_portal(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdatePortal")
    )
    input_: capo_apiportal.types.update_portal_request.UpdatePortalRequest = {
        "portal_id": portal_id
    }
    if portal_content is not None:
        input_["portal_content"] = portal_content
    if endpoint_configuration is not None:
        input_["endpoint_configuration"] = endpoint_configuration
    if authorization is not None:
        input_["authorization"] = authorization
    if rum_app_monitor_name is not None:
        input_["rum_app_monitor_name"] = rum_app_monitor_name
    if included_product_arns is not None:
        input_["included_product_arns"] = included_product_arns
    if logo_uri is not None:
        input_["logo_uri"] = logo_uri

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