All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.transfer.model.SftpConnectorConfig Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Transfer for SFTP module holds the client classes that are used for communicating with AWS Transfer for SFTP Service

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2019-2024 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.transfer.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Contains the details for an SFTP connector object. The connector object is used for transferring files to and from a * partner's SFTP server. *

* *

* Because the SftpConnectorConfig data type is used for both creating and updating SFTP connectors, its * parameters, TrustedHostKeys and UserSecretId are marked as not required. This is a bit * misleading, as they are not required when you are updating an existing SFTP connector, but are required when * you are creating a new SFTP connector. *

*
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SftpConnectorConfig implements Serializable, Cloneable, StructuredPojo { /** *

* The identifier for the secret (in Amazon Web Services Secrets Manager) that contains the SFTP user's private key, * password, or both. The identifier must be the Amazon Resource Name (ARN) of the secret. *

*/ private String userSecretId; /** *

* The public portion of the host key, or keys, that are used to identify the external server to which you are * connecting. You can use the ssh-keyscan command against the SFTP server to retrieve the necessary * key. *

*

* The three standard SSH public key format elements are <key type>, * <body base64>, and an optional <comment>, with spaces between each element. * Specify only the <key type> and <body base64>: do not enter the * <comment> portion of the key. *

*

* For the trusted host key, Transfer Family accepts RSA and ECDSA keys. *

*
    *
  • *

    * For RSA keys, the <key type> string is ssh-rsa. *

    *
  • *
  • *

    * For ECDSA keys, the <key type> string is either ecdsa-sha2-nistp256, * ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521, depending on the size of the key you * generated. *

    *
  • *
*

* Run this command to retrieve the SFTP server host key, where your SFTP server name is ftp.host.com. *

*

* ssh-keyscan ftp.host.com *

*

* This prints the public host key to standard output. *

*

* ftp.host.com ssh-rsa AAAAB3Nza...<long-string-for-public-key *

*

* Copy and paste this string into the TrustedHostKeys field for the create-connector * command or into the Trusted host keys field in the console. *

*/ private java.util.List trustedHostKeys; /** *

* The identifier for the secret (in Amazon Web Services Secrets Manager) that contains the SFTP user's private key, * password, or both. The identifier must be the Amazon Resource Name (ARN) of the secret. *

* * @param userSecretId * The identifier for the secret (in Amazon Web Services Secrets Manager) that contains the SFTP user's * private key, password, or both. The identifier must be the Amazon Resource Name (ARN) of the secret. */ public void setUserSecretId(String userSecretId) { this.userSecretId = userSecretId; } /** *

* The identifier for the secret (in Amazon Web Services Secrets Manager) that contains the SFTP user's private key, * password, or both. The identifier must be the Amazon Resource Name (ARN) of the secret. *

* * @return The identifier for the secret (in Amazon Web Services Secrets Manager) that contains the SFTP user's * private key, password, or both. The identifier must be the Amazon Resource Name (ARN) of the secret. */ public String getUserSecretId() { return this.userSecretId; } /** *

* The identifier for the secret (in Amazon Web Services Secrets Manager) that contains the SFTP user's private key, * password, or both. The identifier must be the Amazon Resource Name (ARN) of the secret. *

* * @param userSecretId * The identifier for the secret (in Amazon Web Services Secrets Manager) that contains the SFTP user's * private key, password, or both. The identifier must be the Amazon Resource Name (ARN) of the secret. * @return Returns a reference to this object so that method calls can be chained together. */ public SftpConnectorConfig withUserSecretId(String userSecretId) { setUserSecretId(userSecretId); return this; } /** *

* The public portion of the host key, or keys, that are used to identify the external server to which you are * connecting. You can use the ssh-keyscan command against the SFTP server to retrieve the necessary * key. *

*

* The three standard SSH public key format elements are <key type>, * <body base64>, and an optional <comment>, with spaces between each element. * Specify only the <key type> and <body base64>: do not enter the * <comment> portion of the key. *

*

* For the trusted host key, Transfer Family accepts RSA and ECDSA keys. *

*
    *
  • *

    * For RSA keys, the <key type> string is ssh-rsa. *

    *
  • *
  • *

    * For ECDSA keys, the <key type> string is either ecdsa-sha2-nistp256, * ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521, depending on the size of the key you * generated. *

    *
  • *
*

* Run this command to retrieve the SFTP server host key, where your SFTP server name is ftp.host.com. *

*

* ssh-keyscan ftp.host.com *

*

* This prints the public host key to standard output. *

*

* ftp.host.com ssh-rsa AAAAB3Nza...<long-string-for-public-key *

*

* Copy and paste this string into the TrustedHostKeys field for the create-connector * command or into the Trusted host keys field in the console. *

* * @return The public portion of the host key, or keys, that are used to identify the external server to which you * are connecting. You can use the ssh-keyscan command against the SFTP server to retrieve the * necessary key.

*

* The three standard SSH public key format elements are <key type>, * <body base64>, and an optional <comment>, with spaces between each * element. Specify only the <key type> and <body base64>: do not * enter the <comment> portion of the key. *

*

* For the trusted host key, Transfer Family accepts RSA and ECDSA keys. *

*
    *
  • *

    * For RSA keys, the <key type> string is ssh-rsa. *

    *
  • *
  • *

    * For ECDSA keys, the <key type> string is either ecdsa-sha2-nistp256, * ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521, depending on the size of the key * you generated. *

    *
  • *
*

* Run this command to retrieve the SFTP server host key, where your SFTP server name is * ftp.host.com. *

*

* ssh-keyscan ftp.host.com *

*

* This prints the public host key to standard output. *

*

* ftp.host.com ssh-rsa AAAAB3Nza...<long-string-for-public-key *

*

* Copy and paste this string into the TrustedHostKeys field for the * create-connector command or into the Trusted host keys field in the console. */ public java.util.List getTrustedHostKeys() { return trustedHostKeys; } /** *

* The public portion of the host key, or keys, that are used to identify the external server to which you are * connecting. You can use the ssh-keyscan command against the SFTP server to retrieve the necessary * key. *

*

* The three standard SSH public key format elements are <key type>, * <body base64>, and an optional <comment>, with spaces between each element. * Specify only the <key type> and <body base64>: do not enter the * <comment> portion of the key. *

*

* For the trusted host key, Transfer Family accepts RSA and ECDSA keys. *

*
    *
  • *

    * For RSA keys, the <key type> string is ssh-rsa. *

    *
  • *
  • *

    * For ECDSA keys, the <key type> string is either ecdsa-sha2-nistp256, * ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521, depending on the size of the key you * generated. *

    *
  • *
*

* Run this command to retrieve the SFTP server host key, where your SFTP server name is ftp.host.com. *

*

* ssh-keyscan ftp.host.com *

*

* This prints the public host key to standard output. *

*

* ftp.host.com ssh-rsa AAAAB3Nza...<long-string-for-public-key *

*

* Copy and paste this string into the TrustedHostKeys field for the create-connector * command or into the Trusted host keys field in the console. *

* * @param trustedHostKeys * The public portion of the host key, or keys, that are used to identify the external server to which you * are connecting. You can use the ssh-keyscan command against the SFTP server to retrieve the * necessary key.

*

* The three standard SSH public key format elements are <key type>, * <body base64>, and an optional <comment>, with spaces between each * element. Specify only the <key type> and <body base64>: do not enter * the <comment> portion of the key. *

*

* For the trusted host key, Transfer Family accepts RSA and ECDSA keys. *

*
    *
  • *

    * For RSA keys, the <key type> string is ssh-rsa. *

    *
  • *
  • *

    * For ECDSA keys, the <key type> string is either ecdsa-sha2-nistp256, * ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521, depending on the size of the key * you generated. *

    *
  • *
*

* Run this command to retrieve the SFTP server host key, where your SFTP server name is * ftp.host.com. *

*

* ssh-keyscan ftp.host.com *

*

* This prints the public host key to standard output. *

*

* ftp.host.com ssh-rsa AAAAB3Nza...<long-string-for-public-key *

*

* Copy and paste this string into the TrustedHostKeys field for the * create-connector command or into the Trusted host keys field in the console. */ public void setTrustedHostKeys(java.util.Collection trustedHostKeys) { if (trustedHostKeys == null) { this.trustedHostKeys = null; return; } this.trustedHostKeys = new java.util.ArrayList(trustedHostKeys); } /** *

* The public portion of the host key, or keys, that are used to identify the external server to which you are * connecting. You can use the ssh-keyscan command against the SFTP server to retrieve the necessary * key. *

*

* The three standard SSH public key format elements are <key type>, * <body base64>, and an optional <comment>, with spaces between each element. * Specify only the <key type> and <body base64>: do not enter the * <comment> portion of the key. *

*

* For the trusted host key, Transfer Family accepts RSA and ECDSA keys. *

*
    *
  • *

    * For RSA keys, the <key type> string is ssh-rsa. *

    *
  • *
  • *

    * For ECDSA keys, the <key type> string is either ecdsa-sha2-nistp256, * ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521, depending on the size of the key you * generated. *

    *
  • *
*

* Run this command to retrieve the SFTP server host key, where your SFTP server name is ftp.host.com. *

*

* ssh-keyscan ftp.host.com *

*

* This prints the public host key to standard output. *

*

* ftp.host.com ssh-rsa AAAAB3Nza...<long-string-for-public-key *

*

* Copy and paste this string into the TrustedHostKeys field for the create-connector * command or into the Trusted host keys field in the console. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setTrustedHostKeys(java.util.Collection)} or {@link #withTrustedHostKeys(java.util.Collection)} if you * want to override the existing values. *

* * @param trustedHostKeys * The public portion of the host key, or keys, that are used to identify the external server to which you * are connecting. You can use the ssh-keyscan command against the SFTP server to retrieve the * necessary key.

*

* The three standard SSH public key format elements are <key type>, * <body base64>, and an optional <comment>, with spaces between each * element. Specify only the <key type> and <body base64>: do not enter * the <comment> portion of the key. *

*

* For the trusted host key, Transfer Family accepts RSA and ECDSA keys. *

*
    *
  • *

    * For RSA keys, the <key type> string is ssh-rsa. *

    *
  • *
  • *

    * For ECDSA keys, the <key type> string is either ecdsa-sha2-nistp256, * ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521, depending on the size of the key * you generated. *

    *
  • *
*

* Run this command to retrieve the SFTP server host key, where your SFTP server name is * ftp.host.com. *

*

* ssh-keyscan ftp.host.com *

*

* This prints the public host key to standard output. *

*

* ftp.host.com ssh-rsa AAAAB3Nza...<long-string-for-public-key *

*

* Copy and paste this string into the TrustedHostKeys field for the * create-connector command or into the Trusted host keys field in the console. * @return Returns a reference to this object so that method calls can be chained together. */ public SftpConnectorConfig withTrustedHostKeys(String... trustedHostKeys) { if (this.trustedHostKeys == null) { setTrustedHostKeys(new java.util.ArrayList(trustedHostKeys.length)); } for (String ele : trustedHostKeys) { this.trustedHostKeys.add(ele); } return this; } /** *

* The public portion of the host key, or keys, that are used to identify the external server to which you are * connecting. You can use the ssh-keyscan command against the SFTP server to retrieve the necessary * key. *

*

* The three standard SSH public key format elements are <key type>, * <body base64>, and an optional <comment>, with spaces between each element. * Specify only the <key type> and <body base64>: do not enter the * <comment> portion of the key. *

*

* For the trusted host key, Transfer Family accepts RSA and ECDSA keys. *

*
    *
  • *

    * For RSA keys, the <key type> string is ssh-rsa. *

    *
  • *
  • *

    * For ECDSA keys, the <key type> string is either ecdsa-sha2-nistp256, * ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521, depending on the size of the key you * generated. *

    *
  • *
*

* Run this command to retrieve the SFTP server host key, where your SFTP server name is ftp.host.com. *

*

* ssh-keyscan ftp.host.com *

*

* This prints the public host key to standard output. *

*

* ftp.host.com ssh-rsa AAAAB3Nza...<long-string-for-public-key *

*

* Copy and paste this string into the TrustedHostKeys field for the create-connector * command or into the Trusted host keys field in the console. *

* * @param trustedHostKeys * The public portion of the host key, or keys, that are used to identify the external server to which you * are connecting. You can use the ssh-keyscan command against the SFTP server to retrieve the * necessary key.

*

* The three standard SSH public key format elements are <key type>, * <body base64>, and an optional <comment>, with spaces between each * element. Specify only the <key type> and <body base64>: do not enter * the <comment> portion of the key. *

*

* For the trusted host key, Transfer Family accepts RSA and ECDSA keys. *

*
    *
  • *

    * For RSA keys, the <key type> string is ssh-rsa. *

    *
  • *
  • *

    * For ECDSA keys, the <key type> string is either ecdsa-sha2-nistp256, * ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521, depending on the size of the key * you generated. *

    *
  • *
*

* Run this command to retrieve the SFTP server host key, where your SFTP server name is * ftp.host.com. *

*

* ssh-keyscan ftp.host.com *

*

* This prints the public host key to standard output. *

*

* ftp.host.com ssh-rsa AAAAB3Nza...<long-string-for-public-key *

*

* Copy and paste this string into the TrustedHostKeys field for the * create-connector command or into the Trusted host keys field in the console. * @return Returns a reference to this object so that method calls can be chained together. */ public SftpConnectorConfig withTrustedHostKeys(java.util.Collection trustedHostKeys) { setTrustedHostKeys(trustedHostKeys); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getUserSecretId() != null) sb.append("UserSecretId: ").append(getUserSecretId()).append(","); if (getTrustedHostKeys() != null) sb.append("TrustedHostKeys: ").append(getTrustedHostKeys()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SftpConnectorConfig == false) return false; SftpConnectorConfig other = (SftpConnectorConfig) obj; if (other.getUserSecretId() == null ^ this.getUserSecretId() == null) return false; if (other.getUserSecretId() != null && other.getUserSecretId().equals(this.getUserSecretId()) == false) return false; if (other.getTrustedHostKeys() == null ^ this.getTrustedHostKeys() == null) return false; if (other.getTrustedHostKeys() != null && other.getTrustedHostKeys().equals(this.getTrustedHostKeys()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getUserSecretId() == null) ? 0 : getUserSecretId().hashCode()); hashCode = prime * hashCode + ((getTrustedHostKeys() == null) ? 0 : getTrustedHostKeys().hashCode()); return hashCode; } @Override public SftpConnectorConfig clone() { try { return (SftpConnectorConfig) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.transfer.model.transform.SftpConnectorConfigMarshaller.getInstance().marshall(this, protocolMarshaller); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy