/* * Copyright 2018-2023 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.eks.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 UpdateAddonRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The name of the cluster. *

*/ private String clusterName; /** *

* The name of the add-on. The name must match one of the names returned by ListAddons . *

*/ private String addonName; /** *

* The version of the add-on. The version must match one of the versions returned by * DescribeAddonVersions . *

*/ private String addonVersion; /** *

* The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account. The role must be * assigned the IAM permissions required by the add-on. If you don't specify an existing IAM role, then the add-on * uses the permissions assigned to the node IAM role. For more information, see Amazon EKS node IAM role in the * Amazon EKS User Guide. *

* *

* To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC) provider created for your cluster. * For more information, see Enabling IAM * roles for service accounts on your cluster in the Amazon EKS User Guide. *

*
*/ private String serviceAccountRoleArn; /** *

* How to resolve field value conflicts for an Amazon EKS add-on if you've changed a value from the Amazon EKS * default value. Conflicts are handled based on the option you choose: *

* */ private String resolveConflicts; /** *

* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *

*/ private String clientRequestToken; /** *

* The set of configuration values for the add-on that's created. The values that you provide are validated against * the schema in * DescribeAddonConfiguration. *

*/ private String configurationValues; /** *

* The name of the cluster. *

* * @param clusterName * The name of the cluster. */ public void setClusterName(String clusterName) { this.clusterName = clusterName; } /** *

* The name of the cluster. *

* * @return The name of the cluster. */ public String getClusterName() { return this.clusterName; } /** *

* The name of the cluster. *

* * @param clusterName * The name of the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAddonRequest withClusterName(String clusterName) { setClusterName(clusterName); return this; } /** *

* The name of the add-on. The name must match one of the names returned by ListAddons . *

* * @param addonName * The name of the add-on. The name must match one of the names returned by ListAddons * . */ public void setAddonName(String addonName) { this.addonName = addonName; } /** *

* The name of the add-on. The name must match one of the names returned by ListAddons . *

* * @return The name of the add-on. The name must match one of the names returned by ListAddons * . */ public String getAddonName() { return this.addonName; } /** *

* The name of the add-on. The name must match one of the names returned by ListAddons . *

* * @param addonName * The name of the add-on. The name must match one of the names returned by ListAddons * . * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAddonRequest withAddonName(String addonName) { setAddonName(addonName); return this; } /** *

* The version of the add-on. The version must match one of the versions returned by * DescribeAddonVersions . *

* * @param addonVersion * The version of the add-on. The version must match one of the versions returned by * DescribeAddonVersions . */ public void setAddonVersion(String addonVersion) { this.addonVersion = addonVersion; } /** *

* The version of the add-on. The version must match one of the versions returned by * DescribeAddonVersions . *

* * @return The version of the add-on. The version must match one of the versions returned by * DescribeAddonVersions . */ public String getAddonVersion() { return this.addonVersion; } /** *

* The version of the add-on. The version must match one of the versions returned by * DescribeAddonVersions . *

* * @param addonVersion * The version of the add-on. The version must match one of the versions returned by * DescribeAddonVersions . * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAddonRequest withAddonVersion(String addonVersion) { setAddonVersion(addonVersion); return this; } /** *

* The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account. The role must be * assigned the IAM permissions required by the add-on. If you don't specify an existing IAM role, then the add-on * uses the permissions assigned to the node IAM role. For more information, see Amazon EKS node IAM role in the * Amazon EKS User Guide. *

* *

* To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC) provider created for your cluster. * For more information, see Enabling IAM * roles for service accounts on your cluster in the Amazon EKS User Guide. *

*
* * @param serviceAccountRoleArn * The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account. The role * must be assigned the IAM permissions required by the add-on. If you don't specify an existing IAM role, * then the add-on uses the permissions assigned to the node IAM role. For more information, see Amazon EKS node IAM role * in the Amazon EKS User Guide.

*

* To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC) provider created for your * cluster. For more information, see Enabling IAM roles for service accounts on your cluster in the Amazon EKS User Guide. *

*/ public void setServiceAccountRoleArn(String serviceAccountRoleArn) { this.serviceAccountRoleArn = serviceAccountRoleArn; } /** *

* The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account. The role must be * assigned the IAM permissions required by the add-on. If you don't specify an existing IAM role, then the add-on * uses the permissions assigned to the node IAM role. For more information, see Amazon EKS node IAM role in the * Amazon EKS User Guide. *

* *

* To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC) provider created for your cluster. * For more information, see Enabling IAM * roles for service accounts on your cluster in the Amazon EKS User Guide. *

*
* * @return The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account. The role * must be assigned the IAM permissions required by the add-on. If you don't specify an existing IAM role, * then the add-on uses the permissions assigned to the node IAM role. For more information, see Amazon EKS node IAM * role in the Amazon EKS User Guide.

*

* To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC) provider created for your * cluster. For more information, see Enabling IAM roles for service accounts on your cluster in the Amazon EKS User Guide. *

*/ public String getServiceAccountRoleArn() { return this.serviceAccountRoleArn; } /** *

* The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account. The role must be * assigned the IAM permissions required by the add-on. If you don't specify an existing IAM role, then the add-on * uses the permissions assigned to the node IAM role. For more information, see Amazon EKS node IAM role in the * Amazon EKS User Guide. *

* *

* To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC) provider created for your cluster. * For more information, see Enabling IAM * roles for service accounts on your cluster in the Amazon EKS User Guide. *

*
* * @param serviceAccountRoleArn * The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's service account. The role * must be assigned the IAM permissions required by the add-on. If you don't specify an existing IAM role, * then the add-on uses the permissions assigned to the node IAM role. For more information, see Amazon EKS node IAM role * in the Amazon EKS User Guide.

*

* To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC) provider created for your * cluster. For more information, see Enabling IAM roles for service accounts on your cluster in the Amazon EKS User Guide. *

* @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAddonRequest withServiceAccountRoleArn(String serviceAccountRoleArn) { setServiceAccountRoleArn(serviceAccountRoleArn); return this; } /** *

* How to resolve field value conflicts for an Amazon EKS add-on if you've changed a value from the Amazon EKS * default value. Conflicts are handled based on the option you choose: *

*
    *
  • *

    * None – Amazon EKS doesn't change the value. The update might fail. *

    *
  • *
  • *

    * Overwrite – Amazon EKS overwrites the changed value back to the Amazon EKS default value. *

    *
  • *
  • *

    * Preserve – Amazon EKS preserves the value. If you choose this option, we recommend that you test any field * and value changes on a non-production cluster before updating the add-on on your production cluster. *

    *
  • *
* * @param resolveConflicts * How to resolve field value conflicts for an Amazon EKS add-on if you've changed a value from the Amazon * EKS default value. Conflicts are handled based on the option you choose:

*
    *
  • *

    * None – Amazon EKS doesn't change the value. The update might fail. *

    *
  • *
  • *

    * Overwrite – Amazon EKS overwrites the changed value back to the Amazon EKS default value. *

    *
  • *
  • *

    * Preserve – Amazon EKS preserves the value. If you choose this option, we recommend that you test * any field and value changes on a non-production cluster before updating the add-on on your production * cluster. *

    *
  • * @see ResolveConflicts */ public void setResolveConflicts(String resolveConflicts) { this.resolveConflicts = resolveConflicts; } /** *

    * How to resolve field value conflicts for an Amazon EKS add-on if you've changed a value from the Amazon EKS * default value. Conflicts are handled based on the option you choose: *

    *
      *
    • *

      * None – Amazon EKS doesn't change the value. The update might fail. *

      *
    • *
    • *

      * Overwrite – Amazon EKS overwrites the changed value back to the Amazon EKS default value. *

      *
    • *
    • *

      * Preserve – Amazon EKS preserves the value. If you choose this option, we recommend that you test any field * and value changes on a non-production cluster before updating the add-on on your production cluster. *

      *
    • *
    * * @return How to resolve field value conflicts for an Amazon EKS add-on if you've changed a value from the Amazon * EKS default value. Conflicts are handled based on the option you choose:

    *
      *
    • *

      * None – Amazon EKS doesn't change the value. The update might fail. *

      *
    • *
    • *

      * Overwrite – Amazon EKS overwrites the changed value back to the Amazon EKS default value. *

      *
    • *
    • *

      * Preserve – Amazon EKS preserves the value. If you choose this option, we recommend that you test * any field and value changes on a non-production cluster before updating the add-on on your production * cluster. *

      *
    • * @see ResolveConflicts */ public String getResolveConflicts() { return this.resolveConflicts; } /** *

      * How to resolve field value conflicts for an Amazon EKS add-on if you've changed a value from the Amazon EKS * default value. Conflicts are handled based on the option you choose: *

      *
        *
      • *

        * None – Amazon EKS doesn't change the value. The update might fail. *

        *
      • *
      • *

        * Overwrite – Amazon EKS overwrites the changed value back to the Amazon EKS default value. *

        *
      • *
      • *

        * Preserve – Amazon EKS preserves the value. If you choose this option, we recommend that you test any field * and value changes on a non-production cluster before updating the add-on on your production cluster. *

        *
      • *
      * * @param resolveConflicts * How to resolve field value conflicts for an Amazon EKS add-on if you've changed a value from the Amazon * EKS default value. Conflicts are handled based on the option you choose:

      *
        *
      • *

        * None – Amazon EKS doesn't change the value. The update might fail. *

        *
      • *
      • *

        * Overwrite – Amazon EKS overwrites the changed value back to the Amazon EKS default value. *

        *
      • *
      • *

        * Preserve – Amazon EKS preserves the value. If you choose this option, we recommend that you test * any field and value changes on a non-production cluster before updating the add-on on your production * cluster. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see ResolveConflicts */ public UpdateAddonRequest withResolveConflicts(String resolveConflicts) { setResolveConflicts(resolveConflicts); return this; } /** *

        * How to resolve field value conflicts for an Amazon EKS add-on if you've changed a value from the Amazon EKS * default value. Conflicts are handled based on the option you choose: *

        *
          *
        • *

          * None – Amazon EKS doesn't change the value. The update might fail. *

          *
        • *
        • *

          * Overwrite – Amazon EKS overwrites the changed value back to the Amazon EKS default value. *

          *
        • *
        • *

          * Preserve – Amazon EKS preserves the value. If you choose this option, we recommend that you test any field * and value changes on a non-production cluster before updating the add-on on your production cluster. *

          *
        • *
        * * @param resolveConflicts * How to resolve field value conflicts for an Amazon EKS add-on if you've changed a value from the Amazon * EKS default value. Conflicts are handled based on the option you choose:

        *
          *
        • *

          * None – Amazon EKS doesn't change the value. The update might fail. *

          *
        • *
        • *

          * Overwrite – Amazon EKS overwrites the changed value back to the Amazon EKS default value. *

          *
        • *
        • *

          * Preserve – Amazon EKS preserves the value. If you choose this option, we recommend that you test * any field and value changes on a non-production cluster before updating the add-on on your production * cluster. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see ResolveConflicts */ public UpdateAddonRequest withResolveConflicts(ResolveConflicts resolveConflicts) { this.resolveConflicts = resolveConflicts.toString(); return this; } /** *

          * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *

          * * @param clientRequestToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. */ public void setClientRequestToken(String clientRequestToken) { this.clientRequestToken = clientRequestToken; } /** *

          * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *

          * * @return Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. */ public String getClientRequestToken() { return this.clientRequestToken; } /** *

          * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *

          * * @param clientRequestToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAddonRequest withClientRequestToken(String clientRequestToken) { setClientRequestToken(clientRequestToken); return this; } /** *

          * The set of configuration values for the add-on that's created. The values that you provide are validated against * the schema in * DescribeAddonConfiguration. *

          * * @param configurationValues * The set of configuration values for the add-on that's created. The values that you provide are validated * against the schema in DescribeAddonConfiguration. */ public void setConfigurationValues(String configurationValues) { this.configurationValues = configurationValues; } /** *

          * The set of configuration values for the add-on that's created. The values that you provide are validated against * the schema in * DescribeAddonConfiguration. *

          * * @return The set of configuration values for the add-on that's created. The values that you provide are validated * against the schema in DescribeAddonConfiguration. */ public String getConfigurationValues() { return this.configurationValues; } /** *

          * The set of configuration values for the add-on that's created. The values that you provide are validated against * the schema in * DescribeAddonConfiguration. *

          * * @param configurationValues * The set of configuration values for the add-on that's created. The values that you provide are validated * against the schema in DescribeAddonConfiguration. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAddonRequest withConfigurationValues(String configurationValues) { setConfigurationValues(configurationValues); 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 (getClusterName() != null) sb.append("ClusterName: ").append(getClusterName()).append(","); if (getAddonName() != null) sb.append("AddonName: ").append(getAddonName()).append(","); if (getAddonVersion() != null) sb.append("AddonVersion: ").append(getAddonVersion()).append(","); if (getServiceAccountRoleArn() != null) sb.append("ServiceAccountRoleArn: ").append(getServiceAccountRoleArn()).append(","); if (getResolveConflicts() != null) sb.append("ResolveConflicts: ").append(getResolveConflicts()).append(","); if (getClientRequestToken() != null) sb.append("ClientRequestToken: ").append(getClientRequestToken()).append(","); if (getConfigurationValues() != null) sb.append("ConfigurationValues: ").append(getConfigurationValues()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateAddonRequest == false) return false; UpdateAddonRequest other = (UpdateAddonRequest) obj; if (other.getClusterName() == null ^ this.getClusterName() == null) return false; if (other.getClusterName() != null && other.getClusterName().equals(this.getClusterName()) == false) return false; if (other.getAddonName() == null ^ this.getAddonName() == null) return false; if (other.getAddonName() != null && other.getAddonName().equals(this.getAddonName()) == false) return false; if (other.getAddonVersion() == null ^ this.getAddonVersion() == null) return false; if (other.getAddonVersion() != null && other.getAddonVersion().equals(this.getAddonVersion()) == false) return false; if (other.getServiceAccountRoleArn() == null ^ this.getServiceAccountRoleArn() == null) return false; if (other.getServiceAccountRoleArn() != null && other.getServiceAccountRoleArn().equals(this.getServiceAccountRoleArn()) == false) return false; if (other.getResolveConflicts() == null ^ this.getResolveConflicts() == null) return false; if (other.getResolveConflicts() != null && other.getResolveConflicts().equals(this.getResolveConflicts()) == false) return false; if (other.getClientRequestToken() == null ^ this.getClientRequestToken() == null) return false; if (other.getClientRequestToken() != null && other.getClientRequestToken().equals(this.getClientRequestToken()) == false) return false; if (other.getConfigurationValues() == null ^ this.getConfigurationValues() == null) return false; if (other.getConfigurationValues() != null && other.getConfigurationValues().equals(this.getConfigurationValues()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClusterName() == null) ? 0 : getClusterName().hashCode()); hashCode = prime * hashCode + ((getAddonName() == null) ? 0 : getAddonName().hashCode()); hashCode = prime * hashCode + ((getAddonVersion() == null) ? 0 : getAddonVersion().hashCode()); hashCode = prime * hashCode + ((getServiceAccountRoleArn() == null) ? 0 : getServiceAccountRoleArn().hashCode()); hashCode = prime * hashCode + ((getResolveConflicts() == null) ? 0 : getResolveConflicts().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); hashCode = prime * hashCode + ((getConfigurationValues() == null) ? 0 : getConfigurationValues().hashCode()); return hashCode; } @Override public UpdateAddonRequest clone() { return (UpdateAddonRequest) super.clone(); } }