CodeStarconnections

Client

class CodeStarconnections.Client

A low-level client representing AWS CodeStar connections:

client = session.create_client('codestar-connections')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
create_connection(**kwargs)

Creates a connection that can then be given to other AWS services like CodePipeline so that it can access third-party code repositories. The connection is in pending status until the third-party connection handshake is completed from the console.

See also: AWS API Documentation

Request Syntax

response = client.create_connection(
    ProviderType='Bitbucket',
    ConnectionName='string'
)
Parameters
  • ProviderType (string) --

    [REQUIRED]

    The name of the external provider where your third-party code repository is configured. Currently, the valid provider type is Bitbucket.

  • ConnectionName (string) --

    [REQUIRED]

    The name of the connection to be created. The name must be unique in the calling AWS account.

Return type

dict

Returns

Response Syntax

{
    'ConnectionArn': 'string'
}

Response Structure

  • (dict) --

    • ConnectionArn (string) --

      The Amazon Resource Name (ARN) of the connection to be created. The ARN is used as the connection reference when the connection is shared between AWS services.

      Note

      The ARN is never reused if the connection is deleted.

delete_connection(**kwargs)

The connection to be deleted.

See also: AWS API Documentation

Request Syntax

response = client.delete_connection(
    ConnectionArn='string'
)
Parameters
ConnectionArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the connection to be deleted.

Note

The ARN is never reused if the connection is deleted.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters
  • ClientMethod (string) -- The client method to presign for
  • Params (dict) -- The parameters normally passed to ClientMethod.
  • ExpiresIn (int) -- The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
  • HttpMethod (string) -- The http method to use on the generated url. By default, the http method is whatever is used in the method's model.
Returns

The presigned url

get_connection(**kwargs)

Returns the connection ARN and details such as status, owner, and provider type.

See also: AWS API Documentation

Request Syntax

response = client.get_connection(
    ConnectionArn='string'
)
Parameters
ConnectionArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of a connection.

Return type
dict
Returns
Response Syntax
{
    'Connection': {
        'ConnectionName': 'string',
        'ConnectionArn': 'string',
        'ProviderType': 'Bitbucket',
        'OwnerAccountId': 'string',
        'ConnectionStatus': 'PENDING'|'AVAILABLE'|'ERROR'
    }
}

Response Structure

  • (dict) --
    • Connection (dict) --

      The connection details, such as status, owner, and provider type.

      • ConnectionName (string) --

        The name of the connection. Connection names must be unique in an AWS user account.

      • ConnectionArn (string) --

        The Amazon Resource Name (ARN) of the connection. The ARN is used as the connection reference when the connection is shared between AWS services.

        Note

        The ARN is never reused if the connection is deleted.

      • ProviderType (string) --

        The name of the external provider where your third-party code repository is configured. Currently, the valid provider type is Bitbucket.

      • OwnerAccountId (string) --

        The name of the external provider where your third-party code repository is configured. For Bitbucket, this is the account ID of the owner of the Bitbucket repository.

      • ConnectionStatus (string) --

        The current status of the connection.

get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
list_connections(**kwargs)

Lists the connections associated with your account.

See also: AWS API Documentation

Request Syntax

response = client.list_connections(
    ProviderTypeFilter='Bitbucket',
    MaxResults=123,
    NextToken='string'
)
Parameters
  • ProviderTypeFilter (string) -- Filters the list of connections to those associated with a specified provider, such as Bitbucket.
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token that was returned from the previous ListConnections call, which can be used to return the next set of connections in the list.
Return type

dict

Returns

Response Syntax

{
    'Connections': [
        {
            'ConnectionName': 'string',
            'ConnectionArn': 'string',
            'ProviderType': 'Bitbucket',
            'OwnerAccountId': 'string',
            'ConnectionStatus': 'PENDING'|'AVAILABLE'|'ERROR'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Connections (list) --

      A list of connections and the details for each connection, such as status, owner, and provider type.

      • (dict) --

        The configuration that allows a service such as CodePipeline to connect to a third-party code repository.

        • ConnectionName (string) --

          The name of the connection. Connection names must be unique in an AWS user account.

        • ConnectionArn (string) --

          The Amazon Resource Name (ARN) of the connection. The ARN is used as the connection reference when the connection is shared between AWS services.

          Note

          The ARN is never reused if the connection is deleted.

        • ProviderType (string) --

          The name of the external provider where your third-party code repository is configured. Currently, the valid provider type is Bitbucket.

        • OwnerAccountId (string) --

          The name of the external provider where your third-party code repository is configured. For Bitbucket, this is the account ID of the owner of the Bitbucket repository.

        • ConnectionStatus (string) --

          The current status of the connection.

    • NextToken (string) --

      A token that can be used in the next ListConnections call. To view all items in the list, continue to call this operation with each subsequent token until no more nextToken values are returned.

Paginators

The available paginators are: