Modifies a Redshift-managed VPC endpoint.
Parameters:
-
endpoint_name
(Optional[String], default:
None
)
–
The endpoint to be modified.
-
vpc_security_group_ids
(Optional[VpcSecurityGroupIdList], default:
None
)
–
The complete list of VPC security groups associated with the endpoint after the endpoint is modified.
Raises:
Source code in docs_src/capo_redshift/_services/async_redshift.py
| async def modify_endpoint_access(
self,
*,
config_overrides: Optional[AsyncRedshiftClientConfig] = None,
endpoint_name: Optional["capo_redshift.types.string.String"] = None,
vpc_security_group_ids: Optional[
"capo_redshift.types.vpc_security_group_id_list.VpcSecurityGroupIdList"
] = None,
) -> "capo_redshift.types.endpoint_access.EndpointAccess":
"""<p>Modifies a Redshift-managed VPC endpoint.</p>
Args:
endpoint_name: <p>The endpoint to be modified.</p>
vpc_security_group_ids: <p>The complete list of VPC security groups associated with the endpoint after the endpoint is modified.</p>
Raises:
capo_redshift.errors.cluster_not_found_fault.ClusterNotFoundFault: <p>The <code>ClusterIdentifier</code> parameter does not refer to an existing cluster. </p>
capo_redshift.errors.endpoint_not_found_fault.EndpointNotFoundFault: <p>The endpoint name doesn't refer to an existing endpoint.</p>
capo_redshift.errors.invalid_cluster_security_group_state_fault.InvalidClusterSecurityGroupStateFault: <p>The state of the cluster security group is not <code>available</code>. </p>
capo_redshift.errors.invalid_cluster_state_fault.InvalidClusterStateFault: <p>The specified cluster is not in the <code>available</code> state. </p>
capo_redshift.errors.invalid_endpoint_state_fault.InvalidEndpointStateFault: <p>The status of the endpoint is not valid.</p>
capo_redshift.errors.unauthorized_operation.UnauthorizedOperation: <p>Your account is not authorized to perform the requested operation.</p>
capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_redshift.types.modify_endpoint_access_message.ModifyEndpointAccessMessage]",
) -> AsyncOperationResponse[
"capo_redshift.types.endpoint_access.EndpointAccess"
]:
import capo_redshift._operations.redshift_service_version20121201.modify_endpoint_access
(
output,
http_response,
) = await capo_redshift._operations.redshift_service_version20121201.modify_endpoint_access.async_modify_endpoint_access(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ModifyEndpointAccess")
)
input_: capo_redshift.types.modify_endpoint_access_message.ModifyEndpointAccessMessage = {}
if endpoint_name is not None:
input_["endpoint_name"] = endpoint_name
if vpc_security_group_ids is not None:
input_["vpc_security_group_ids"] = vpc_security_group_ids
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|