create_integration
¶
create_integration(
integration_type: IntegrationType,
name: str,
*,
config_overrides: Optional[CloudWatchOmniClientConfig] = None,
credential: Optional[IntegrationCredential] = None,
integration_attributes: Optional[StringMap] = None,
role_arn: Optional[str] = None,
tags: Optional[TagMap] = None,
client_token: Optional[str] = None,
) -> CreateIntegrationOutput
Creates an integration with a third-party provider. Returns the integration identifier and its initial status; when the provider requires interactive consent, an authorization URL is returned for the user to complete setup.
Parameters:
-
integration_type(IntegrationType) –The type of third-party provider to integrate with.
-
name(str) –The name for the new integration; unique within the account.
-
credential(Optional[IntegrationCredential], default:None) –The credential used to authenticate with the third-party provider.
-
integration_attributes(Optional[StringMap], default:None) –Provider-specific attributes to associate with the integration.
-
role_arn(Optional[str], default:None) –The Amazon Resource Name of the IAM role assumed to access the integration.
-
tags(Optional[TagMap], default:None) –Tags to apply to the integration at creation time (Tagris tag-on-create).
-
client_token(Optional[str], default:None) –Idempotency token for safe retries. Retrying with the same token returns the original integration instead of creating a duplicate.
Raises:
-
AccessDeniedException–The caller is not authorized to perform this action.
-
ConflictException–The operation could not be completed because of a conflict with the current state of the resource.
-
InternalServerException–An unexpected error occurred while processing the request.
-
ResourceNotFoundException–The specified resource does not exist.
-
ThrottlingException–The request was throttled due to exceeding the allowed request rate.
-
ValidationException–A parameter is specified incorrectly.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Create an AWS integration The following example creates an AWS_INTEGRATION named my-aws-integration, authorized by an IAM role. Payloads are shown as JSON; on the wire they are CBOR-encoded.
>>> client.create_integration(integration_type='AWS_INTEGRATION', name='my-aws-integration', role_arn='arn:aws:iam::123456789012:role/service-role/CloudWatchIntegrationRole', client_token='b3f8c7d6-5b4a-4c3d-9e2f-1a0b2c3d4e5f')
Source code in docs_src/capo_cloudwatchomni/_services/cloud_watch_omni.py
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 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 | |