createMicrosoftTeamsChannelConfiguration method
- required String channelId,
- required String configurationName,
- required String iamRoleArn,
- required String teamId,
- required String tenantId,
- String? channelName,
- List<
String> ? guardrailPolicyArns, - String? loggingLevel,
- List<
String> ? snsTopicArns, - List<
Tag> ? tags, - String? teamName,
- bool? userAuthorizationRequired,
Creates an AWS Chatbot configuration for Microsoft Teams.
May throw ConflictException.
May throw CreateTeamsChannelConfigurationException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw LimitExceededException.
Parameter channelId :
The ID of the Microsoft Teams channel.
Parameter configurationName :
The name of the configuration.
Parameter iamRoleArn :
A user-defined role that AWS Chatbot assumes. This is not the
service-linked role.
For more information, see IAM policies for AWS Chatbot in the AWS Chatbot Administrator Guide.
Parameter teamId :
The ID of the Microsoft Teams authorized with AWS Chatbot.
To get the team ID, you must perform the initial authorization flow with Microsoft Teams in the AWS Chatbot console. Then you can copy and paste the team ID from the console. For more information, see Step 1: Configure a Microsoft Teams client in the AWS Chatbot Administrator Guide.
Parameter tenantId :
The ID of the Microsoft Teams tenant.
Parameter channelName :
The name of the Microsoft Teams channel.
Parameter guardrailPolicyArns :
The list of IAM policy ARNs that are applied as channel guardrails. The
AWS managed AdministratorAccess policy is applied by default
if this is not set.
Parameter loggingLevel :
Logging levels include ERROR, INFO, or
NONE.
Parameter snsTopicArns :
The Amazon Resource Names (ARNs) of the SNS topics that deliver
notifications to AWS Chatbot.
Parameter tags :
A map of tags assigned to a resource. A tag is a string-to-string map of
key-value pairs.
Parameter teamName :
The name of the Microsoft Teams Team.
Parameter userAuthorizationRequired :
Enables use of a user role requirement in your chat configuration.
Implementation
Future<CreateTeamsChannelConfigurationResult>
createMicrosoftTeamsChannelConfiguration({
required String channelId,
required String configurationName,
required String iamRoleArn,
required String teamId,
required String tenantId,
String? channelName,
List<String>? guardrailPolicyArns,
String? loggingLevel,
List<String>? snsTopicArns,
List<Tag>? tags,
String? teamName,
bool? userAuthorizationRequired,
}) async {
final $payload = <String, dynamic>{
'ChannelId': channelId,
'ConfigurationName': configurationName,
'IamRoleArn': iamRoleArn,
'TeamId': teamId,
'TenantId': tenantId,
if (channelName != null) 'ChannelName': channelName,
if (guardrailPolicyArns != null)
'GuardrailPolicyArns': guardrailPolicyArns,
if (loggingLevel != null) 'LoggingLevel': loggingLevel,
if (snsTopicArns != null) 'SnsTopicArns': snsTopicArns,
if (tags != null) 'Tags': tags,
if (teamName != null) 'TeamName': teamName,
if (userAuthorizationRequired != null)
'UserAuthorizationRequired': userAuthorizationRequired,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/create-ms-teams-channel-configuration',
exceptionFnMap: _exceptionFns,
);
return CreateTeamsChannelConfigurationResult.fromJson(response);
}