Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . cloudformation ]

set-stack-policy

Description

Sets a stack policy for a specified stack.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  set-stack-policy
--stack-name <value>
[--stack-policy-body <value>]
[--stack-policy-url <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--stack-name (string)

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

--stack-policy-body (string)

Structure containing the stack policy body. For more information, go to Prevent Updates to Stack Resources in the AWS CloudFormation User Guide. You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.

--stack-policy-url (string)

Location of a file containing the stack policy. The URL must point to a policy (maximum size: 16 KB) located in an S3 bucket in the same region as the stack. You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Output

None