Skip to content

revoke_cluster_security_group_ingress async

revoke_cluster_security_group_ingress(
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    cluster_security_group_name: Optional[String] = None,
    cidrip: Optional[String] = None,
    ec2_security_group_name: Optional[String] = None,
    ec2_security_group_owner_id: Optional[String] = None,
) -> RevokeClusterSecurityGroupIngressResult

Revokes an ingress rule in an Amazon Redshift security group for a previously authorized IP range or Amazon EC2 security group. To add an ingress rule, see AuthorizeClusterSecurityGroupIngress. For information about managing security groups, go to Amazon Redshift Cluster Security Groups in the Amazon Redshift Cluster Management Guide.

Parameters:

  • cluster_security_group_name (Optional[String], default: None ) –

    The name of the security Group from which to revoke the ingress rule.

  • cidrip (Optional[String], default: None ) –

    The IP range for which to revoke access. This range must be a valid Classless Inter-Domain Routing (CIDR) block of IP addresses. If CIDRIP is specified, EC2SecurityGroupName and EC2SecurityGroupOwnerId cannot be provided.

  • ec2_security_group_name (Optional[String], default: None ) –

    The name of the EC2 Security Group whose access is to be revoked. If EC2SecurityGroupName is specified, EC2SecurityGroupOwnerId must also be provided and CIDRIP cannot be provided.

  • ec2_security_group_owner_id (Optional[String], default: None ) –

    The Amazon Web Services account number of the owner of the security group specified in the EC2SecurityGroupName parameter. The Amazon Web Services access key ID is not an acceptable value. If EC2SecurityGroupOwnerId is specified, EC2SecurityGroupName must also be provided. and CIDRIP cannot be provided.

    Example: 111122223333

Raises:

Source code in docs_src/capo_redshift/_services/async_redshift.py
async def revoke_cluster_security_group_ingress(
    self,
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    cluster_security_group_name: Optional[
        "capo_redshift.types.string.String"
    ] = None,
    cidrip: Optional["capo_redshift.types.string.String"] = None,
    ec2_security_group_name: Optional["capo_redshift.types.string.String"] = None,
    ec2_security_group_owner_id: Optional[
        "capo_redshift.types.string.String"
    ] = None,
) -> "capo_redshift.types.revoke_cluster_security_group_ingress_result.RevokeClusterSecurityGroupIngressResult":
    """<p>Revokes an ingress rule in an Amazon Redshift security group for a previously authorized IP range or Amazon EC2 security group. To add an ingress rule, see <a>AuthorizeClusterSecurityGroupIngress</a>. For information about managing security groups, go to <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-security-groups.html">Amazon Redshift Cluster Security Groups</a> in the <i>Amazon Redshift Cluster Management Guide</i>. </p>

    Args:
        cluster_security_group_name: <p>The name of the security Group from which to revoke the ingress rule.</p>
        cidrip: <p>The IP range for which to revoke access. This range must be a valid Classless Inter-Domain Routing (CIDR) block of IP addresses. If <code>CIDRIP</code> is specified, <code>EC2SecurityGroupName</code> and <code>EC2SecurityGroupOwnerId</code> cannot be provided. </p>
        ec2_security_group_name: <p>The name of the EC2 Security Group whose access is to be revoked. If <code>EC2SecurityGroupName</code> is specified, <code>EC2SecurityGroupOwnerId</code> must also be provided and <code>CIDRIP</code> cannot be provided. </p>
        ec2_security_group_owner_id: <p>The Amazon Web Services account number of the owner of the security group specified in the <code>EC2SecurityGroupName</code> parameter. The Amazon Web Services access key ID is not an acceptable value. If <code>EC2SecurityGroupOwnerId</code> is specified, <code>EC2SecurityGroupName</code> must also be provided. and <code>CIDRIP</code> cannot be provided. </p> <p>Example: <code>111122223333</code> </p>

    Raises:
        capo_redshift.errors.authorization_not_found_fault.AuthorizationNotFoundFault: <p>The specified CIDR IP range or EC2 security group is not authorized for the specified cluster security group.</p>
        capo_redshift.errors.cluster_security_group_not_found_fault.ClusterSecurityGroupNotFoundFault: <p>The cluster security group name does not refer to an existing cluster security group.</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.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_redshift.types.revoke_cluster_security_group_ingress_message.RevokeClusterSecurityGroupIngressMessage]",
    ) -> AsyncOperationResponse[
        "capo_redshift.types.revoke_cluster_security_group_ingress_result.RevokeClusterSecurityGroupIngressResult"
    ]:
        import capo_redshift._operations.redshift_service_version20121201.revoke_cluster_security_group_ingress

        (
            output,
            http_response,
        ) = await capo_redshift._operations.redshift_service_version20121201.revoke_cluster_security_group_ingress.async_revoke_cluster_security_group_ingress(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RevokeClusterSecurityGroupIngress")
    )
    input_: capo_redshift.types.revoke_cluster_security_group_ingress_message.RevokeClusterSecurityGroupIngressMessage = {}
    if cluster_security_group_name is not None:
        input_["cluster_security_group_name"] = cluster_security_group_name
    if cidrip is not None:
        input_["cidrip"] = cidrip
    if ec2_security_group_name is not None:
        input_["ec2_security_group_name"] = ec2_security_group_name
    if ec2_security_group_owner_id is not None:
        input_["ec2_security_group_owner_id"] = ec2_security_group_owner_id

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