:doc:`ResilienceHub <../../resiliencehub>` / Client / create_recommendation_template

******************************
create_recommendation_template
******************************



.. py:method:: ResilienceHub.Client.create_recommendation_template(**kwargs)

  

  Creates a new recommendation template for the Resilience Hub application.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/resiliencehub-2020-04-30/CreateRecommendationTemplate>`_  


  **Request Syntax**
  ::

    response = client.create_recommendation_template(
        assessmentArn='string',
        bucketName='string',
        clientToken='string',
        format='CfnYaml'|'CfnJson',
        name='string',
        recommendationIds=[
            'string',
        ],
        recommendationTypes=[
            'Alarm'|'Sop'|'Test',
        ],
        tags={
            'string': 'string'
        }
    )
    
  :type assessmentArn: string
  :param assessmentArn: **[REQUIRED]** 

    Amazon Resource Name (ARN) of the assessment. The format for this ARN is: arn: ``partition``:resiliencehub: ``region``: ``account``:app-assessment/ ``app-id``. For more information about ARNs, see `Amazon Resource Names (ARNs) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *Amazon Web Services General Reference* guide.

    

  
  :type bucketName: string
  :param bucketName: 

    The name of the Amazon S3 bucket that will contain the recommendation template.

    

  
  :type clientToken: string
  :param clientToken: 

    Used for an idempotency token. A client token is a unique, case-sensitive string of up to 64 ASCII characters. You should not reuse the same client token for other API requests.

    This field is autopopulated if not provided.

  
  :type format: string
  :param format: 

    The format for the recommendation template.

      CfnJson  

    The template is CloudFormation JSON.

      CfnYaml  

    The template is CloudFormation YAML.

    

  
  :type name: string
  :param name: **[REQUIRED]** 

    The name for the recommendation template.

    

  
  :type recommendationIds: list
  :param recommendationIds: 

    Identifiers for the recommendations used to create a recommendation template.

    

  
    - *(string) --* 

    

  :type recommendationTypes: list
  :param recommendationTypes: 

    An array of strings that specify the recommendation template type or types.

      Alarm  

    The template is an  AlarmRecommendation template.

      Sop  

    The template is a  SopRecommendation template.

      Test  

    The template is a  TestRecommendation template.

    

  
    - *(string) --* 

    

  :type tags: dict
  :param tags: 

    Tags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key/value pair.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'recommendationTemplate': {
              'appArn': 'string',
              'assessmentArn': 'string',
              'endTime': datetime(2015, 1, 1),
              'format': 'CfnYaml'|'CfnJson',
              'message': 'string',
              'name': 'string',
              'needsReplacements': True|False,
              'recommendationIds': [
                  'string',
              ],
              'recommendationTemplateArn': 'string',
              'recommendationTypes': [
                  'Alarm'|'Sop'|'Test',
              ],
              'startTime': datetime(2015, 1, 1),
              'status': 'Pending'|'InProgress'|'Failed'|'Success',
              'tags': {
                  'string': 'string'
              },
              'templatesLocation': {
                  'bucket': 'string',
                  'prefix': 'string'
              }
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **recommendationTemplate** *(dict) --* 

        The newly created recommendation template, returned as an object. This object includes the template's name, format, status, tags, Amazon S3 bucket location, and more.

        
        

        - **appArn** *(string) --* 

          Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn: ``partition``:resiliencehub: ``region``: ``account``:app/ ``app-id``. For more information about ARNs, see `Amazon Resource Names (ARNs) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *Amazon Web Services General Reference* guide.

          
        

        - **assessmentArn** *(string) --* 

          Amazon Resource Name (ARN) of the assessment. The format for this ARN is: arn: ``partition``:resiliencehub: ``region``: ``account``:app-assessment/ ``app-id``. For more information about ARNs, see `Amazon Resource Names (ARNs) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *Amazon Web Services General Reference* guide.

          
        

        - **endTime** *(datetime) --* 

          The end time for the action.

          
        

        - **format** *(string) --* 

          Format of the recommendation template.

            CfnJson  

          The template is CloudFormation JSON.

            CfnYaml  

          The template is CloudFormation YAML.

          
        

        - **message** *(string) --* 

          Message for the recommendation template.

          
        

        - **name** *(string) --* 

          Name for the recommendation template.

          
        

        - **needsReplacements** *(boolean) --* 

          Indicates if replacements are needed.

          
        

        - **recommendationIds** *(list) --* 

          Identifiers for the recommendations used in the recommendation template.

          
          

          - *(string) --* 
      
        

        - **recommendationTemplateArn** *(string) --* 

          Amazon Resource Name (ARN) for the recommendation template.

          
        

        - **recommendationTypes** *(list) --* 

          An array of strings that specify the recommendation template type or types.

            Alarm  

          The template is an  AlarmRecommendation template.

            Sop  

          The template is a  SopRecommendation template.

            Test  

          The template is a  TestRecommendation template.

          
          

          - *(string) --* 
      
        

        - **startTime** *(datetime) --* 

          The start time for the action.

          
        

        - **status** *(string) --* 

          Status of the action.

          
        

        - **tags** *(dict) --* 

          Tags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key/value pair.

          
          

          - *(string) --* 
            

            - *(string) --* 
      
    
        

        - **templatesLocation** *(dict) --* 

          The file location of the template.

          
          

          - **bucket** *(string) --* 

            The name of the Amazon S3 bucket.

            
          

          - **prefix** *(string) --* 

            The prefix for the Amazon S3 bucket.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`ResilienceHub.Client.exceptions.InternalServerException`

  
  *   :py:class:`ResilienceHub.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`ResilienceHub.Client.exceptions.ConflictException`

  
  *   :py:class:`ResilienceHub.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`ResilienceHub.Client.exceptions.ThrottlingException`

  
  *   :py:class:`ResilienceHub.Client.exceptions.ValidationException`

  
  *   :py:class:`ResilienceHub.Client.exceptions.AccessDeniedException`

  