Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.identitymanagement.model;
 
 
Container for the parameters to the UploadServerCertificate operation.

Uploads a server certificate entity for the AWS account. The server certificate entity includes a public key certificate, a private key, and an optional certificate chain, which should all be PEM-encoded.

For information about the number of server certificates you can upload, see Limitations on IAM Entities in the Using IAM guide.

NOTE:Because the body of the public key certificate, private key, and the certificate chain can be large, you should use POST rather than GET when calling UploadServerCertificate. For information about setting up signatures and authorization through the API, go to Signing AWS API Requests in the AWS General Reference. For general information about using the Query API with IAM, go to Making Query Requests in the Using IAM guide.

 
 public class UploadServerCertificateRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The path for the server certificate. For more information about paths, see IAM Identifiers in the Using IAM guide.

This parameter is optional. If it is not included, it defaults to a slash (/). <note> If you are uploading a server certificate specifically for use with Amazon CloudFront distributions, you must specify a path using the --path option. The path must begin with /cloudfront and must include a trailing slash (for example, /cloudfront/test/). </note>

Constraints:
Length: 1 - 512
Pattern: (\u002F)|(\u002F[\u0021-\u007F]+\u002F)

 
     private String path;

    
The name for the server certificate. Do not include the path in this value. The name of the certificate cannot contain any spaces.

Constraints:
Length: 1 - 128
Pattern: [\w+=,.@-]*

 
     private String serverCertificateName;

    
The contents of the public key certificate in PEM-encoded format.

Constraints:
Length: 1 - 16384
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]+

 
     private String certificateBody;

    
The contents of the private key in PEM-encoded format.

Constraints:
Length: 1 - 16384
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]*

 
     private String privateKey;

    
The contents of the certificate chain. This is typically a concatenation of the PEM-encoded public key certificates of the chain.

Constraints:
Length: 1 - 2097152
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]*

    private String certificateChain;

    
Default constructor for a new UploadServerCertificateRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
    public UploadServerCertificateRequest() {}
    
    
Constructs a new UploadServerCertificateRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
serverCertificateName The name for the server certificate. Do not include the path in this value. The name of the certificate cannot contain any spaces.
certificateBody The contents of the public key certificate in PEM-encoded format.
privateKey The contents of the private key in PEM-encoded format.
    public UploadServerCertificateRequest(String serverCertificateNameString certificateBodyString privateKey) {
        setServerCertificateName(serverCertificateName);
        setCertificateBody(certificateBody);
        setPrivateKey(privateKey);
    }

    
The path for the server certificate. For more information about paths, see IAM Identifiers in the Using IAM guide.

This parameter is optional. If it is not included, it defaults to a slash (/). <note> If you are uploading a server certificate specifically for use with Amazon CloudFront distributions, you must specify a path using the --path option. The path must begin with /cloudfront and must include a trailing slash (for example, /cloudfront/test/). </note>

Constraints:
Length: 1 - 512
Pattern: (\u002F)|(\u002F[\u0021-\u007F]+\u002F)

Returns:
The path for the server certificate. For more information about paths, see IAM Identifiers in the Using IAM guide.

This parameter is optional. If it is not included, it defaults to a slash (/). <note> If you are uploading a server certificate specifically for use with Amazon CloudFront distributions, you must specify a path using the --path option. The path must begin with /cloudfront and must include a trailing slash (for example, /cloudfront/test/). </note>

    public String getPath() {
        return ;
    }
    
    
The path for the server certificate. For more information about paths, see IAM Identifiers in the Using IAM guide.

This parameter is optional. If it is not included, it defaults to a slash (/). <note> If you are uploading a server certificate specifically for use with Amazon CloudFront distributions, you must specify a path using the --path option. The path must begin with /cloudfront and must include a trailing slash (for example, /cloudfront/test/). </note>

Constraints:
Length: 1 - 512
Pattern: (\u002F)|(\u002F[\u0021-\u007F]+\u002F)

Parameters:
path The path for the server certificate. For more information about paths, see IAM Identifiers in the Using IAM guide.

This parameter is optional. If it is not included, it defaults to a slash (/). <note> If you are uploading a server certificate specifically for use with Amazon CloudFront distributions, you must specify a path using the --path option. The path must begin with /cloudfront and must include a trailing slash (for example, /cloudfront/test/). </note>

    public void setPath(String path) {
        this. = path;
    }
    
    
The path for the server certificate. For more information about paths, see IAM Identifiers in the Using IAM guide.

This parameter is optional. If it is not included, it defaults to a slash (/). <note> If you are uploading a server certificate specifically for use with Amazon CloudFront distributions, you must specify a path using the --path option. The path must begin with /cloudfront and must include a trailing slash (for example, /cloudfront/test/). </note>

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 512
Pattern: (\u002F)|(\u002F[\u0021-\u007F]+\u002F)

Parameters:
path The path for the server certificate. For more information about paths, see IAM Identifiers in the Using IAM guide.

This parameter is optional. If it is not included, it defaults to a slash (/). <note> If you are uploading a server certificate specifically for use with Amazon CloudFront distributions, you must specify a path using the --path option. The path must begin with /cloudfront and must include a trailing slash (for example, /cloudfront/test/). </note>

Returns:
A reference to this updated object so that method calls can be chained together.
        this. = path;
        return this;
    }

    
The name for the server certificate. Do not include the path in this value. The name of the certificate cannot contain any spaces.

Constraints:
Length: 1 - 128
Pattern: [\w+=,.@-]*

Returns:
The name for the server certificate. Do not include the path in this value. The name of the certificate cannot contain any spaces.
    public String getServerCertificateName() {
        return ;
    }
    
    
The name for the server certificate. Do not include the path in this value. The name of the certificate cannot contain any spaces.

Constraints:
Length: 1 - 128
Pattern: [\w+=,.@-]*

Parameters:
serverCertificateName The name for the server certificate. Do not include the path in this value. The name of the certificate cannot contain any spaces.
    public void setServerCertificateName(String serverCertificateName) {
        this. = serverCertificateName;
    }
    
    
The name for the server certificate. Do not include the path in this value. The name of the certificate cannot contain any spaces.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 128
Pattern: [\w+=,.@-]*

Parameters:
serverCertificateName The name for the server certificate. Do not include the path in this value. The name of the certificate cannot contain any spaces.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UploadServerCertificateRequest withServerCertificateName(String serverCertificateName) {
        this. = serverCertificateName;
        return this;
    }

    
The contents of the public key certificate in PEM-encoded format.

Constraints:
Length: 1 - 16384
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]+

Returns:
The contents of the public key certificate in PEM-encoded format.
    public String getCertificateBody() {
        return ;
    }
    
    
The contents of the public key certificate in PEM-encoded format.

Constraints:
Length: 1 - 16384
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]+

Parameters:
certificateBody The contents of the public key certificate in PEM-encoded format.
    public void setCertificateBody(String certificateBody) {
        this. = certificateBody;
    }
    
    
The contents of the public key certificate in PEM-encoded format.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 16384
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]+

Parameters:
certificateBody The contents of the public key certificate in PEM-encoded format.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UploadServerCertificateRequest withCertificateBody(String certificateBody) {
        this. = certificateBody;
        return this;
    }

    
The contents of the private key in PEM-encoded format.

Constraints:
Length: 1 - 16384
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]*

Returns:
The contents of the private key in PEM-encoded format.
    public String getPrivateKey() {
        return ;
    }
    
    
The contents of the private key in PEM-encoded format.

Constraints:
Length: 1 - 16384
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]*

Parameters:
privateKey The contents of the private key in PEM-encoded format.
    public void setPrivateKey(String privateKey) {
        this. = privateKey;
    }
    
    
The contents of the private key in PEM-encoded format.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 16384
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]*

Parameters:
privateKey The contents of the private key in PEM-encoded format.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = privateKey;
        return this;
    }

    
The contents of the certificate chain. This is typically a concatenation of the PEM-encoded public key certificates of the chain.

Constraints:
Length: 1 - 2097152
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]*

Returns:
The contents of the certificate chain. This is typically a concatenation of the PEM-encoded public key certificates of the chain.
    public String getCertificateChain() {
        return ;
    }
    
    
The contents of the certificate chain. This is typically a concatenation of the PEM-encoded public key certificates of the chain.

Constraints:
Length: 1 - 2097152
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]*

Parameters:
certificateChain The contents of the certificate chain. This is typically a concatenation of the PEM-encoded public key certificates of the chain.
    public void setCertificateChain(String certificateChain) {
        this. = certificateChain;
    }
    
    
The contents of the certificate chain. This is typically a concatenation of the PEM-encoded public key certificates of the chain.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 2097152
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]*

Parameters:
certificateChain The contents of the certificate chain. This is typically a concatenation of the PEM-encoded public key certificates of the chain.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UploadServerCertificateRequest withCertificateChain(String certificateChain) {
        this. = certificateChain;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getPath() != nullsb.append("Path: " + getPath() + ",");
        if (getServerCertificateName() != nullsb.append("ServerCertificateName: " + getServerCertificateName() + ",");
        if (getCertificateBody() != nullsb.append("CertificateBody: " + getCertificateBody() + ",");
        if (getPrivateKey() != nullsb.append("PrivateKey: " + getPrivateKey() + ",");
        if (getCertificateChain() != nullsb.append("CertificateChain: " + getCertificateChain() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getPath() == null) ? 0 : getPath().hashCode()); 
        hashCode = prime * hashCode + ((getServerCertificateName() == null) ? 0 : getServerCertificateName().hashCode()); 
        hashCode = prime * hashCode + ((getCertificateBody() == null) ? 0 : getCertificateBody().hashCode()); 
        hashCode = prime * hashCode + ((getPrivateKey() == null) ? 0 : getPrivateKey().hashCode()); 
        hashCode = prime * hashCode + ((getCertificateChain() == null) ? 0 : getCertificateChain().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof UploadServerCertificateRequest == falsereturn false;
        
        if (other.getPath() == null ^ this.getPath() == nullreturn false;
        if (other.getPath() != null && other.getPath().equals(this.getPath()) == falsereturn false
        if (other.getServerCertificateName() == null ^ this.getServerCertificateName() == nullreturn false;
        if (other.getServerCertificateName() != null && other.getServerCertificateName().equals(this.getServerCertificateName()) == falsereturn false
        if (other.getCertificateBody() == null ^ this.getCertificateBody() == nullreturn false;
        if (other.getCertificateBody() != null && other.getCertificateBody().equals(this.getCertificateBody()) == falsereturn false
        if (other.getPrivateKey() == null ^ this.getPrivateKey() == nullreturn false;
        if (other.getPrivateKey() != null && other.getPrivateKey().equals(this.getPrivateKey()) == falsereturn false
        if (other.getCertificateChain() == null ^ this.getCertificateChain() == nullreturn false;
        if (other.getCertificateChain() != null && other.getCertificateChain().equals(this.getCertificateChain()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (UploadServerCertificateRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X