Assurance / Client / create_environment_connection
create_environment_connection¶
- Assurance.Client.create_environment_connection(**kwargs)¶
Creates a connection between a governance environment and an evidence source. Specify the source in
providerConfig.If you call this operation again for a source that is already connected, AWS Assurance returns the current status of the connection and doesn’t create a second one.
See also: AWS API Documentation
Request Syntax
response = client.create_environment_connection( environmentArn='string', providerConfig={ 's3': { 'sourceUri': 'string', 'expectedBucketOwner': 'string' }, 'github': { 'account': 'string' }, 'sharepoint': { 'tenantId': 'string', 'sites': [ 'string', ] } } )
- Parameters:
environmentArn (string) –
[REQUIRED]
The ARN of this governance environment.
providerConfig (dict) –
[REQUIRED]
The evidence source to connect. Set exactly one member.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
s3,github,sharepoint.s3 (dict) –
An Amazon S3 bucket, or a prefix within a bucket.
sourceUri (string) – [REQUIRED]
The S3 URI of the bucket or prefix, for example
s3://amzn-s3-demo-bucket/compliance/. The bucket must be in the same AWS Region as the governance environment.expectedBucketOwner (string) –
The ID of the AWS account that must own the bucket. Required for a bucket in another account. AWS Assurance sends this value with each request to the bucket, and the request fails if a different account owns the bucket.
github (dict) –
A GitHub organization or user account.
account (string) –
The name of the GitHub organization or user account to connect. You can omit it for the first connection to an account. Specify it if another environment already installed the AWS Assurance app on the account.
sharepoint (dict) –
A SharePoint Online tenant and the sites to read.
tenantId (string) –
The ID of the Microsoft Entra tenant, in globally unique identifier (GUID) format. If you specify it, your administrator approves access in one visit to Microsoft. If you omit it, your administrator approves access in two visits.
sites (list) – [REQUIRED]
The URLs of the SharePoint sites that the connection can read, from 1 to 50. Ask a SharePoint administrator to grant the AWS Assurance application read access to each site. The connection can’t discover which sites your administrator granted, so list each one here.
(string) –
The URL of a SharePoint site, such as
https://contoso.sharepoint.com/sites/finance.
- Return type:
dict
- Returns:
Response Syntax
{ 'status': 'ACTIVE'|'PENDING', 'authorizationUrl': 'string' }
Response Structure
(dict) –
status (string) –
The status of the connection. To get the other attributes of the connection, call
ListEnvironmentConnections.authorizationUrl (string) –
The URL to open in a browser to approve access at GitHub or Microsoft. The response includes this URL only for a
githuborsharepointconnection with a status ofPENDING. The connection becomesACTIVEafter you approve access.The response includes this URL only once. If you lose it, call
CreateEnvironmentConnectionagain.
Exceptions