com.amazonaws.services.databasemigrationservice.model.CreateInstanceProfileRequest Maven / Gradle / Ivy
/*
* 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.databasemigrationservice.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateInstanceProfileRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The Availability Zone where the instance profile will be created. The default value is a random, system-chosen
* Availability Zone in the Amazon Web Services Region where your data provider is created, for examplem
* us-east-1d
.
*
*/
private String availabilityZone;
/**
*
* The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the connection parameters for the instance
* profile.
*
*
* If you don't specify a value for the KmsKeyArn
parameter, then DMS uses your default encryption key.
*
*
* KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has
* a different default encryption key for each Amazon Web Services Region.
*
*/
private String kmsKeyArn;
/**
*
* Specifies the accessibility options for the instance profile. A value of true
represents an instance
* profile with a public IP address. A value of false
represents an instance profile with a private IP
* address. The default value is true
.
*
*/
private Boolean publiclyAccessible;
/**
*
* One or more tags to be assigned to the instance profile.
*
*/
private java.util.List tags;
/**
*
* Specifies the network type for the instance profile. A value of IPV4
represents an instance profile
* with IPv4 network type and only supports IPv4 addressing. A value of IPV6
represents an instance
* profile with IPv6 network type and only supports IPv6 addressing. A value of DUAL
represents an
* instance profile with dual network type that supports IPv4 and IPv6 addressing.
*
*/
private String networkType;
/**
*
* A user-friendly name for the instance profile.
*
*/
private String instanceProfileName;
/**
*
* A user-friendly description of the instance profile.
*
*/
private String description;
/**
*
* A subnet group to associate with the instance profile.
*
*/
private String subnetGroupIdentifier;
/**
*
* Specifies the VPC security group names to be used with the instance profile. The VPC security group must work
* with the VPC containing the instance profile.
*
*/
private java.util.List vpcSecurityGroups;
/**
*
* The Availability Zone where the instance profile will be created. The default value is a random, system-chosen
* Availability Zone in the Amazon Web Services Region where your data provider is created, for examplem
* us-east-1d
.
*
*
* @param availabilityZone
* The Availability Zone where the instance profile will be created. The default value is a random,
* system-chosen Availability Zone in the Amazon Web Services Region where your data provider is created, for
* examplem us-east-1d
.
*/
public void setAvailabilityZone(String availabilityZone) {
this.availabilityZone = availabilityZone;
}
/**
*
* The Availability Zone where the instance profile will be created. The default value is a random, system-chosen
* Availability Zone in the Amazon Web Services Region where your data provider is created, for examplem
* us-east-1d
.
*
*
* @return The Availability Zone where the instance profile will be created. The default value is a random,
* system-chosen Availability Zone in the Amazon Web Services Region where your data provider is created,
* for examplem us-east-1d
.
*/
public String getAvailabilityZone() {
return this.availabilityZone;
}
/**
*
* The Availability Zone where the instance profile will be created. The default value is a random, system-chosen
* Availability Zone in the Amazon Web Services Region where your data provider is created, for examplem
* us-east-1d
.
*
*
* @param availabilityZone
* The Availability Zone where the instance profile will be created. The default value is a random,
* system-chosen Availability Zone in the Amazon Web Services Region where your data provider is created, for
* examplem us-east-1d
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstanceProfileRequest withAvailabilityZone(String availabilityZone) {
setAvailabilityZone(availabilityZone);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the connection parameters for the instance
* profile.
*
*
* If you don't specify a value for the KmsKeyArn
parameter, then DMS uses your default encryption key.
*
*
* KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has
* a different default encryption key for each Amazon Web Services Region.
*
*
* @param kmsKeyArn
* The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the connection parameters for the
* instance profile.
*
* If you don't specify a value for the KmsKeyArn
parameter, then DMS uses your default
* encryption key.
*
*
* KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services
* account has a different default encryption key for each Amazon Web Services Region.
*/
public void setKmsKeyArn(String kmsKeyArn) {
this.kmsKeyArn = kmsKeyArn;
}
/**
*
* The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the connection parameters for the instance
* profile.
*
*
* If you don't specify a value for the KmsKeyArn
parameter, then DMS uses your default encryption key.
*
*
* KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has
* a different default encryption key for each Amazon Web Services Region.
*
*
* @return The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the connection parameters for the
* instance profile.
*
* If you don't specify a value for the KmsKeyArn
parameter, then DMS uses your default
* encryption key.
*
*
* KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services
* account has a different default encryption key for each Amazon Web Services Region.
*/
public String getKmsKeyArn() {
return this.kmsKeyArn;
}
/**
*
* The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the connection parameters for the instance
* profile.
*
*
* If you don't specify a value for the KmsKeyArn
parameter, then DMS uses your default encryption key.
*
*
* KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has
* a different default encryption key for each Amazon Web Services Region.
*
*
* @param kmsKeyArn
* The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the connection parameters for the
* instance profile.
*
* If you don't specify a value for the KmsKeyArn
parameter, then DMS uses your default
* encryption key.
*
*
* KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services
* account has a different default encryption key for each Amazon Web Services Region.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstanceProfileRequest withKmsKeyArn(String kmsKeyArn) {
setKmsKeyArn(kmsKeyArn);
return this;
}
/**
*
* Specifies the accessibility options for the instance profile. A value of true
represents an instance
* profile with a public IP address. A value of false
represents an instance profile with a private IP
* address. The default value is true
.
*
*
* @param publiclyAccessible
* Specifies the accessibility options for the instance profile. A value of true
represents an
* instance profile with a public IP address. A value of false
represents an instance profile
* with a private IP address. The default value is true
.
*/
public void setPubliclyAccessible(Boolean publiclyAccessible) {
this.publiclyAccessible = publiclyAccessible;
}
/**
*
* Specifies the accessibility options for the instance profile. A value of true
represents an instance
* profile with a public IP address. A value of false
represents an instance profile with a private IP
* address. The default value is true
.
*
*
* @return Specifies the accessibility options for the instance profile. A value of true
represents an
* instance profile with a public IP address. A value of false
represents an instance profile
* with a private IP address. The default value is true
.
*/
public Boolean getPubliclyAccessible() {
return this.publiclyAccessible;
}
/**
*
* Specifies the accessibility options for the instance profile. A value of true
represents an instance
* profile with a public IP address. A value of false
represents an instance profile with a private IP
* address. The default value is true
.
*
*
* @param publiclyAccessible
* Specifies the accessibility options for the instance profile. A value of true
represents an
* instance profile with a public IP address. A value of false
represents an instance profile
* with a private IP address. The default value is true
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstanceProfileRequest withPubliclyAccessible(Boolean publiclyAccessible) {
setPubliclyAccessible(publiclyAccessible);
return this;
}
/**
*
* Specifies the accessibility options for the instance profile. A value of true
represents an instance
* profile with a public IP address. A value of false
represents an instance profile with a private IP
* address. The default value is true
.
*
*
* @return Specifies the accessibility options for the instance profile. A value of true
represents an
* instance profile with a public IP address. A value of false
represents an instance profile
* with a private IP address. The default value is true
.
*/
public Boolean isPubliclyAccessible() {
return this.publiclyAccessible;
}
/**
*
* One or more tags to be assigned to the instance profile.
*
*
* @return One or more tags to be assigned to the instance profile.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* One or more tags to be assigned to the instance profile.
*
*
* @param tags
* One or more tags to be assigned to the instance profile.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* One or more tags to be assigned to the instance profile.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tags
* One or more tags to be assigned to the instance profile.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstanceProfileRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* One or more tags to be assigned to the instance profile.
*
*
* @param tags
* One or more tags to be assigned to the instance profile.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstanceProfileRequest withTags(java.util.Collection tags) {
setTags(tags);
return this;
}
/**
*
* Specifies the network type for the instance profile. A value of IPV4
represents an instance profile
* with IPv4 network type and only supports IPv4 addressing. A value of IPV6
represents an instance
* profile with IPv6 network type and only supports IPv6 addressing. A value of DUAL
represents an
* instance profile with dual network type that supports IPv4 and IPv6 addressing.
*
*
* @param networkType
* Specifies the network type for the instance profile. A value of IPV4
represents an instance
* profile with IPv4 network type and only supports IPv4 addressing. A value of IPV6
represents
* an instance profile with IPv6 network type and only supports IPv6 addressing. A value of DUAL
* represents an instance profile with dual network type that supports IPv4 and IPv6 addressing.
*/
public void setNetworkType(String networkType) {
this.networkType = networkType;
}
/**
*
* Specifies the network type for the instance profile. A value of IPV4
represents an instance profile
* with IPv4 network type and only supports IPv4 addressing. A value of IPV6
represents an instance
* profile with IPv6 network type and only supports IPv6 addressing. A value of DUAL
represents an
* instance profile with dual network type that supports IPv4 and IPv6 addressing.
*
*
* @return Specifies the network type for the instance profile. A value of IPV4
represents an instance
* profile with IPv4 network type and only supports IPv4 addressing. A value of IPV6
represents
* an instance profile with IPv6 network type and only supports IPv6 addressing. A value of
* DUAL
represents an instance profile with dual network type that supports IPv4 and IPv6
* addressing.
*/
public String getNetworkType() {
return this.networkType;
}
/**
*
* Specifies the network type for the instance profile. A value of IPV4
represents an instance profile
* with IPv4 network type and only supports IPv4 addressing. A value of IPV6
represents an instance
* profile with IPv6 network type and only supports IPv6 addressing. A value of DUAL
represents an
* instance profile with dual network type that supports IPv4 and IPv6 addressing.
*
*
* @param networkType
* Specifies the network type for the instance profile. A value of IPV4
represents an instance
* profile with IPv4 network type and only supports IPv4 addressing. A value of IPV6
represents
* an instance profile with IPv6 network type and only supports IPv6 addressing. A value of DUAL
* represents an instance profile with dual network type that supports IPv4 and IPv6 addressing.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstanceProfileRequest withNetworkType(String networkType) {
setNetworkType(networkType);
return this;
}
/**
*
* A user-friendly name for the instance profile.
*
*
* @param instanceProfileName
* A user-friendly name for the instance profile.
*/
public void setInstanceProfileName(String instanceProfileName) {
this.instanceProfileName = instanceProfileName;
}
/**
*
* A user-friendly name for the instance profile.
*
*
* @return A user-friendly name for the instance profile.
*/
public String getInstanceProfileName() {
return this.instanceProfileName;
}
/**
*
* A user-friendly name for the instance profile.
*
*
* @param instanceProfileName
* A user-friendly name for the instance profile.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstanceProfileRequest withInstanceProfileName(String instanceProfileName) {
setInstanceProfileName(instanceProfileName);
return this;
}
/**
*
* A user-friendly description of the instance profile.
*
*
* @param description
* A user-friendly description of the instance profile.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* A user-friendly description of the instance profile.
*
*
* @return A user-friendly description of the instance profile.
*/
public String getDescription() {
return this.description;
}
/**
*
* A user-friendly description of the instance profile.
*
*
* @param description
* A user-friendly description of the instance profile.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstanceProfileRequest withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* A subnet group to associate with the instance profile.
*
*
* @param subnetGroupIdentifier
* A subnet group to associate with the instance profile.
*/
public void setSubnetGroupIdentifier(String subnetGroupIdentifier) {
this.subnetGroupIdentifier = subnetGroupIdentifier;
}
/**
*
* A subnet group to associate with the instance profile.
*
*
* @return A subnet group to associate with the instance profile.
*/
public String getSubnetGroupIdentifier() {
return this.subnetGroupIdentifier;
}
/**
*
* A subnet group to associate with the instance profile.
*
*
* @param subnetGroupIdentifier
* A subnet group to associate with the instance profile.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstanceProfileRequest withSubnetGroupIdentifier(String subnetGroupIdentifier) {
setSubnetGroupIdentifier(subnetGroupIdentifier);
return this;
}
/**
*
* Specifies the VPC security group names to be used with the instance profile. The VPC security group must work
* with the VPC containing the instance profile.
*
*
* @return Specifies the VPC security group names to be used with the instance profile. The VPC security group must
* work with the VPC containing the instance profile.
*/
public java.util.List getVpcSecurityGroups() {
return vpcSecurityGroups;
}
/**
*
* Specifies the VPC security group names to be used with the instance profile. The VPC security group must work
* with the VPC containing the instance profile.
*
*
* @param vpcSecurityGroups
* Specifies the VPC security group names to be used with the instance profile. The VPC security group must
* work with the VPC containing the instance profile.
*/
public void setVpcSecurityGroups(java.util.Collection vpcSecurityGroups) {
if (vpcSecurityGroups == null) {
this.vpcSecurityGroups = null;
return;
}
this.vpcSecurityGroups = new java.util.ArrayList(vpcSecurityGroups);
}
/**
*
* Specifies the VPC security group names to be used with the instance profile. The VPC security group must work
* with the VPC containing the instance profile.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setVpcSecurityGroups(java.util.Collection)} or {@link #withVpcSecurityGroups(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param vpcSecurityGroups
* Specifies the VPC security group names to be used with the instance profile. The VPC security group must
* work with the VPC containing the instance profile.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstanceProfileRequest withVpcSecurityGroups(String... vpcSecurityGroups) {
if (this.vpcSecurityGroups == null) {
setVpcSecurityGroups(new java.util.ArrayList(vpcSecurityGroups.length));
}
for (String ele : vpcSecurityGroups) {
this.vpcSecurityGroups.add(ele);
}
return this;
}
/**
*
* Specifies the VPC security group names to be used with the instance profile. The VPC security group must work
* with the VPC containing the instance profile.
*
*
* @param vpcSecurityGroups
* Specifies the VPC security group names to be used with the instance profile. The VPC security group must
* work with the VPC containing the instance profile.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstanceProfileRequest withVpcSecurityGroups(java.util.Collection vpcSecurityGroups) {
setVpcSecurityGroups(vpcSecurityGroups);
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 (getAvailabilityZone() != null)
sb.append("AvailabilityZone: ").append(getAvailabilityZone()).append(",");
if (getKmsKeyArn() != null)
sb.append("KmsKeyArn: ").append(getKmsKeyArn()).append(",");
if (getPubliclyAccessible() != null)
sb.append("PubliclyAccessible: ").append(getPubliclyAccessible()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getNetworkType() != null)
sb.append("NetworkType: ").append(getNetworkType()).append(",");
if (getInstanceProfileName() != null)
sb.append("InstanceProfileName: ").append(getInstanceProfileName()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getSubnetGroupIdentifier() != null)
sb.append("SubnetGroupIdentifier: ").append(getSubnetGroupIdentifier()).append(",");
if (getVpcSecurityGroups() != null)
sb.append("VpcSecurityGroups: ").append(getVpcSecurityGroups());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateInstanceProfileRequest == false)
return false;
CreateInstanceProfileRequest other = (CreateInstanceProfileRequest) obj;
if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == null)
return false;
if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == false)
return false;
if (other.getKmsKeyArn() == null ^ this.getKmsKeyArn() == null)
return false;
if (other.getKmsKeyArn() != null && other.getKmsKeyArn().equals(this.getKmsKeyArn()) == false)
return false;
if (other.getPubliclyAccessible() == null ^ this.getPubliclyAccessible() == null)
return false;
if (other.getPubliclyAccessible() != null && other.getPubliclyAccessible().equals(this.getPubliclyAccessible()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getNetworkType() == null ^ this.getNetworkType() == null)
return false;
if (other.getNetworkType() != null && other.getNetworkType().equals(this.getNetworkType()) == false)
return false;
if (other.getInstanceProfileName() == null ^ this.getInstanceProfileName() == null)
return false;
if (other.getInstanceProfileName() != null && other.getInstanceProfileName().equals(this.getInstanceProfileName()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getSubnetGroupIdentifier() == null ^ this.getSubnetGroupIdentifier() == null)
return false;
if (other.getSubnetGroupIdentifier() != null && other.getSubnetGroupIdentifier().equals(this.getSubnetGroupIdentifier()) == false)
return false;
if (other.getVpcSecurityGroups() == null ^ this.getVpcSecurityGroups() == null)
return false;
if (other.getVpcSecurityGroups() != null && other.getVpcSecurityGroups().equals(this.getVpcSecurityGroups()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode());
hashCode = prime * hashCode + ((getKmsKeyArn() == null) ? 0 : getKmsKeyArn().hashCode());
hashCode = prime * hashCode + ((getPubliclyAccessible() == null) ? 0 : getPubliclyAccessible().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getNetworkType() == null) ? 0 : getNetworkType().hashCode());
hashCode = prime * hashCode + ((getInstanceProfileName() == null) ? 0 : getInstanceProfileName().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getSubnetGroupIdentifier() == null) ? 0 : getSubnetGroupIdentifier().hashCode());
hashCode = prime * hashCode + ((getVpcSecurityGroups() == null) ? 0 : getVpcSecurityGroups().hashCode());
return hashCode;
}
@Override
public CreateInstanceProfileRequest clone() {
return (CreateInstanceProfileRequest) super.clone();
}
}