Class SetStackPolicyRequest

All Implemented Interfaces:
SdkPojo, ToCopyableBuilder<SetStackPolicyRequest.Builder,SetStackPolicyRequest>

@Generated("software.amazon.awssdk:codegen") public final class SetStackPolicyRequest extends CloudFormationRequest implements ToCopyableBuilder<SetStackPolicyRequest.Builder,SetStackPolicyRequest>

The input for the SetStackPolicy action.

  • Method Details

    • stackName

      public final String stackName()

      The name or unique stack ID that you want to associate a policy with.

      Returns:
      The name or unique stack ID that you want to associate a policy with.
    • stackPolicyBody

      public final String stackPolicyBody()

      Structure that contains the stack policy body. For more information, see Prevent updates to stack resources in the CloudFormation User Guide. You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.

      Returns:
      Structure that contains the stack policy body. For more information, see Prevent updates to stack resources in the CloudFormation User Guide. You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.
    • stackPolicyURL

      public final String stackPolicyURL()

      Location of a file that contains the stack policy. The URL must point to a policy (maximum size: 16 KB) located in an Amazon S3 bucket in the same Amazon Web Services Region as the stack. The location for an Amazon S3 bucket must start with https://. URLs from S3 static websites are not supported.

      You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.

      Returns:
      Location of a file that contains the stack policy. The URL must point to a policy (maximum size: 16 KB) located in an Amazon S3 bucket in the same Amazon Web Services Region as the stack. The location for an Amazon S3 bucket must start with https://. URLs from S3 static websites are not supported.

      You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.

    • toBuilder

      public SetStackPolicyRequest.Builder toBuilder()
      Specified by:
      toBuilder in interface ToCopyableBuilder<SetStackPolicyRequest.Builder,SetStackPolicyRequest>
      Specified by:
      toBuilder in class CloudFormationRequest
    • builder

      public static SetStackPolicyRequest.Builder builder()
    • serializableBuilderClass

      public static Class<? extends SetStackPolicyRequest.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class AwsRequest
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class AwsRequest
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Specified by:
      equalsBySdkFields in interface SdkPojo
    • toString

      public final String toString()
      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.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
      Overrides:
      getValueForField in class SdkRequest
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo