:doc:`CloudFormation <../../cloudformation>` / Client / get_stack_policy

****************
get_stack_policy
****************



.. py:method:: CloudFormation.Client.get_stack_policy(**kwargs)

  

  Returns the stack policy for a specified stack. If a stack doesn't have a policy, a null value is returned.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/GetStackPolicy>`_  


  **Request Syntax**
  ::

    response = client.get_stack_policy(
        StackName='string'
    )
    
  :type StackName: string
  :param StackName: **[REQUIRED]** 

    The name or unique stack ID that's associated with the stack whose policy you want to get.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'StackPolicyBody': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      The output for the  GetStackPolicy action.

      
      

      - **StackPolicyBody** *(string) --* 

        Structure that contains the stack policy body. For more information, see `Prevent updates to stack resources <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html>`__ in the *CloudFormation User Guide*.

        
  