Skip to content

update_resource_configuration async

update_resource_configuration(
    resource_configuration_identifier: ResourceConfigurationIdentifier,
    *,
    config_overrides: Optional[AsyncVPCLatticeClientConfig] = None,
    resource_configuration_definition: Optional[ResourceConfigurationDefinition] = None,
    allow_association_to_shareable_service_network: Optional[Boolean] = None,
    port_ranges: Optional[PortRangeList] = None,
) -> UpdateResourceConfigurationResponse

Updates the specified resource configuration.

Parameters:

  • resource_configuration_identifier (ResourceConfigurationIdentifier) –

    The ID of the resource configuration.

  • resource_configuration_definition (Optional[ResourceConfigurationDefinition], default: None ) –

    Identifies the resource configuration in one of the following ways:

    • Amazon Resource Name (ARN) - Supported resource-types that are provisioned by Amazon Web Services services, such as RDS databases, can be identified by their ARN.

    • Domain name - Any domain name that is publicly resolvable.

    • IP address - For IPv4 and IPv6, only IP addresses in the VPC are supported.

  • allow_association_to_shareable_service_network (Optional[Boolean], default: None ) –

    Indicates whether to add the resource configuration to service networks that are shared with other accounts.

  • port_ranges (Optional[PortRangeList], default: None ) –

    The TCP port ranges that a consumer can use to access a resource configuration. You can separate port ranges with a comma. Example: 1-65535 or 1,2,22-30

Raises:

Source code in docs_src/capo_vpc_lattice/_services/async_vpc_lattice.py
async def update_resource_configuration(
    self,
    resource_configuration_identifier: "capo_vpc_lattice.types.resource_configuration_identifier.ResourceConfigurationIdentifier",
    *,
    config_overrides: Optional[AsyncVPCLatticeClientConfig] = None,
    resource_configuration_definition: Optional[
        "capo_vpc_lattice.types.resource_configuration_definition.ResourceConfigurationDefinition"
    ] = None,
    allow_association_to_shareable_service_network: Optional[
        "capo_vpc_lattice.types.boolean.Boolean"
    ] = None,
    port_ranges: Optional[
        "capo_vpc_lattice.types.port_range_list.PortRangeList"
    ] = None,
) -> "capo_vpc_lattice.types.update_resource_configuration_response.UpdateResourceConfigurationResponse":
    """<p>Updates the specified resource configuration.</p>

    Args:
        resource_configuration_identifier: <p>The ID of the resource configuration.</p>
        resource_configuration_definition: <p>Identifies the resource configuration in one of the following ways:</p> <ul> <li> <p> <b>Amazon Resource Name (ARN)</b> - Supported resource-types that are provisioned by Amazon Web Services services, such as RDS databases, can be identified by their ARN.</p> </li> <li> <p> <b>Domain name</b> - Any domain name that is publicly resolvable.</p> </li> <li> <p> <b>IP address</b> - For IPv4 and IPv6, only IP addresses in the VPC are supported.</p> </li> </ul>
        allow_association_to_shareable_service_network: <p>Indicates whether to add the resource configuration to service networks that are shared with other accounts.</p>
        port_ranges: <p>The TCP port ranges that a consumer can use to access a resource configuration. You can separate port ranges with a comma. Example: 1-65535 or 1,2,22-30</p>

    Raises:
        capo_vpc_lattice.errors.access_denied_exception.AccessDeniedException: <p>The user does not have sufficient access to perform this action.</p>
        capo_vpc_lattice.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred while processing the request.</p>
        capo_vpc_lattice.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource that does not exist.</p>
        capo_vpc_lattice.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would cause a service quota to be exceeded.</p>
        capo_vpc_lattice.errors.throttling_exception.ThrottlingException: <p>The limit on the number of requests per second was exceeded.</p>
        capo_vpc_lattice.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_vpc_lattice.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_vpc_lattice.types.update_resource_configuration_request.UpdateResourceConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_vpc_lattice.types.update_resource_configuration_response.UpdateResourceConfigurationResponse"
    ]:
        import capo_vpc_lattice._operations.mercury_control_plane.update_resource_configuration

        (
            output,
            http_response,
        ) = await capo_vpc_lattice._operations.mercury_control_plane.update_resource_configuration.async_update_resource_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateResourceConfiguration")
    )
    input_: capo_vpc_lattice.types.update_resource_configuration_request.UpdateResourceConfigurationRequest = {
        "resource_configuration_identifier": resource_configuration_identifier
    }
    if resource_configuration_definition is not None:
        input_["resource_configuration_definition"] = (
            resource_configuration_definition
        )
    if allow_association_to_shareable_service_network is not None:
        input_["allow_association_to_shareable_service_network"] = (
            allow_association_to_shareable_service_network
        )
    if port_ranges is not None:
        input_["port_ranges"] = port_ranges

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