create_integration
async
¶
create_integration(
integration_type: IntegrationType,
name: str,
*,
config_overrides: Optional[AsyncCloudWatchOmniClientConfig] = 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.
>>> await 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/async_cloud_watch_omni.py
1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 | |