create_recommendation_template
¶
create_recommendation_template(
assessment_arn: Arn,
name: EntityName,
*,
config_overrides: Optional[resiliencehubClientConfig] = None,
recommendation_ids: Optional[RecommendationIdList] = None,
format: Optional[TemplateFormat] = None,
recommendation_types: Optional[RenderRecommendationTypeList] = None,
client_token: Optional[ClientToken] = None,
tags: Optional[TagMap] = None,
bucket_name: Optional[EntityName] = None,
) -> CreateRecommendationTemplateResponse
Creates a new recommendation template for the Resilience Hub application.
Parameters:
-
recommendation_ids(Optional[RecommendationIdList], default:None) –Identifiers for the recommendations used to create a recommendation template.
-
format(Optional[TemplateFormat], default:None) –The format for the recommendation template.
- CfnJson
-
The template is CloudFormation JSON.
- CfnYaml
-
The template is CloudFormation YAML.
-
recommendation_types(Optional[RenderRecommendationTypeList], default:None) –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.
-
assessment_arn(Arn) –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) in the Amazon Web Services General Reference guide. -
name(EntityName) –The name for the recommendation template.
-
client_token(Optional[ClientToken], default:None) –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.
-
tags(Optional[TagMap], default:None) –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.
-
bucket_name(Optional[EntityName], default:None) –The name of the Amazon S3 bucket that will contain the recommendation template.
Raises:
-
AccessDeniedException–You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions.
-
ConflictException–This exception occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception.
-
InternalServerException–This exception occurs when there is an internal failure in the Resilience Hub service.
-
ResourceNotFoundException–This exception occurs when the specified resource could not be found.
-
ServiceQuotaExceededException–This exception occurs when you have exceeded your service quota. To perform the requested action, remove some of the relevant resources, or use Service Quotas to request a service quota increase.
-
ThrottlingException–This exception occurs when you have exceeded the limit on the number of requests per second.
-
ValidationException–This exception occurs when a request is not valid.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_resiliencehub/_services/resiliencehub.py
757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 | |