public ModifyVpcEndpointRequest withPolicyDocument(String policyDocument) {
        setPolicyDocument(policyDocument);
        return this;
    }
<p>
(Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The
policy must be in valid JSON format.
</p>

@param policyDocument
       (Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service.
       The policy must be in valid JSON format.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/ModifyVpcEndpointRequest.java