AWS CodeStar connections

2020/06/29 - AWS CodeStar connections - 4 new 3 updated api methods

Changes  Updated and new APIs in support of hosts for connections to installed provider types. New integration with the GitHub Enterprise Server provider type.

DeleteHost (new) Link ¶

The host to be deleted. Before you delete a host, all connections associated to the host must be deleted.

Note

A host cannot be deleted if it is in the VPC_CONFIG_INITIALIZING or VPC_CONFIG_DELETING state.

See also: AWS API Documentation

Request Syntax

client.delete_host(
    HostArn='string'
)
type HostArn

string

param HostArn

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

CreateHost (new) Link ¶

Creates a resource that represents the infrastructure where a third-party provider is installed. The host is used when you create connections to an installed third-party provider type, such as GitHub Enterprise Server. You create one host for all connections to that provider.

Note

A host created through the CLI or the SDK is in PENDING status by default. You can make its status AVAILABLE by setting up the host in the console.

See also: AWS API Documentation

Request Syntax

client.create_host(
    Name='string',
    ProviderType='Bitbucket'|'GitHubEnterpriseServer',
    ProviderEndpoint='string',
    VpcConfiguration={
        'VpcId': 'string',
        'SubnetIds': [
            'string',
        ],
        'SecurityGroupIds': [
            'string',
        ],
        'TlsCertificate': 'string'
    }
)
type Name

string

param Name

[REQUIRED]

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

type ProviderType

string

param ProviderType

[REQUIRED]

The name of the installed provider to be associated with your connection. The host resource represents the infrastructure where your provider type is installed. The valid provider type is GitHub Enterprise Server.

type ProviderEndpoint

string

param ProviderEndpoint

[REQUIRED]

The endpoint of the infrastructure to be represented by the host after it is created.

type VpcConfiguration

dict

param VpcConfiguration

The VPC configuration to be provisioned for the host. A VPC must be configured and the infrastructure to be represented by the host must already be connected to the VPC.

  • VpcId (string) -- [REQUIRED]

    The ID of the Amazon VPC connected to the infrastructure where your provider type is installed.

  • SubnetIds (list) -- [REQUIRED]

    The ID of the subnet or subnets associated with the Amazon VPC connected to the infrastructure where your provider type is installed.

    • (string) --

  • SecurityGroupIds (list) -- [REQUIRED]

    The ID of the security group or security groups associated with the Amazon VPC connected to the infrastructure where your provider type is installed.

    • (string) --

  • TlsCertificate (string) --

    The value of the Transport Layer Security (TLS) certificate associated with the infrastructure where your provider type is installed.

rtype

dict

returns

Response Syntax

{
    'HostArn': 'string'
}

Response Structure

  • (dict) --

    • HostArn (string) --

      The Amazon Resource Name (ARN) of the host to be created.

GetHost (new) Link ¶

Returns the host ARN and details such as status, provider type, endpoint, and, if applicable, the VPC configuration.

See also: AWS API Documentation

Request Syntax

client.get_host(
    HostArn='string'
)
type HostArn

string

param HostArn

[REQUIRED]

The Amazon Resource Name (ARN) of the requested host.

rtype

dict

returns

Response Syntax

{
    'Name': 'string',
    'Status': 'string',
    'ProviderType': 'Bitbucket'|'GitHubEnterpriseServer',
    'ProviderEndpoint': 'string',
    'VpcConfiguration': {
        'VpcId': 'string',
        'SubnetIds': [
            'string',
        ],
        'SecurityGroupIds': [
            'string',
        ],
        'TlsCertificate': 'string'
    }
}

Response Structure

  • (dict) --

    • Name (string) --

      The name of the requested host.

    • Status (string) --

      The status of the requested host.

    • ProviderType (string) --

      The provider type of the requested host, such as GitHub Enterprise Server.

    • ProviderEndpoint (string) --

      The endpoint of the infrastructure represented by the requested host.

    • VpcConfiguration (dict) --

      The VPC configuration of the requested host.

      • VpcId (string) --

        The ID of the Amazon VPC connected to the infrastructure where your provider type is installed.

      • SubnetIds (list) --

        The ID of the subnet or subnets associated with the Amazon VPC connected to the infrastructure where your provider type is installed.

        • (string) --

      • SecurityGroupIds (list) --

        The ID of the security group or security groups associated with the Amazon VPC connected to the infrastructure where your provider type is installed.

        • (string) --

      • TlsCertificate (string) --

        The value of the Transport Layer Security (TLS) certificate associated with the infrastructure where your provider type is installed.

ListHosts (new) Link ¶

Lists the hosts associated with your account.

See also: AWS API Documentation

Request Syntax

client.list_hosts(
    MaxResults=123,
    NextToken='string'
)
type MaxResults

integer

param MaxResults

The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value.

type NextToken

string

param NextToken

The token that was returned from the previous ListHosts call, which can be used to return the next set of hosts in the list.

rtype

dict

returns

Response Syntax

{
    'Hosts': [
        {
            'Name': 'string',
            'HostArn': 'string',
            'ProviderType': 'Bitbucket'|'GitHubEnterpriseServer',
            'ProviderEndpoint': 'string',
            'VpcConfiguration': {
                'VpcId': 'string',
                'SubnetIds': [
                    'string',
                ],
                'SecurityGroupIds': [
                    'string',
                ],
                'TlsCertificate': 'string'
            },
            'Status': 'string',
            'StatusMessage': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Hosts (list) --

      A list of hosts and the details for each host, such as status, endpoint, and provider type.

      • (dict) --

        A resource that represents the infrastructure where a third-party provider is installed. The host is used when you create connections to an installed third-party provider type, such as GitHub Enterprise Server. You create one host for all connections to that provider.

        Note

        A host created through the CLI or the SDK is in PENDING status by default. You can make its status AVAILABLE by setting up the host in the console.

        • Name (string) --

          The name of the host.

        • HostArn (string) --

          The Amazon Resource Name (ARN) of the host.

        • ProviderType (string) --

          The name of the installed provider to be associated with your connection. The host resource represents the infrastructure where your provider type is installed. The valid provider type is GitHub Enterprise Server.

        • ProviderEndpoint (string) --

          The endpoint of the infrastructure where your provider type is installed.

        • VpcConfiguration (dict) --

          The VPC configuration provisioned for the host.

          • VpcId (string) --

            The ID of the Amazon VPC connected to the infrastructure where your provider type is installed.

          • SubnetIds (list) --

            The ID of the subnet or subnets associated with the Amazon VPC connected to the infrastructure where your provider type is installed.

            • (string) --

          • SecurityGroupIds (list) --

            The ID of the security group or security groups associated with the Amazon VPC connected to the infrastructure where your provider type is installed.

            • (string) --

          • TlsCertificate (string) --

            The value of the Transport Layer Security (TLS) certificate associated with the infrastructure where your provider type is installed.

        • Status (string) --

          The status of the host, such as PENDING, AVAILABLE, VPC_CONFIG_DELETING, VPC_CONFIG_INITIALIZING, and VPC_CONFIG_FAILED_INITIALIZATION.

        • StatusMessage (string) --

          The status description for the host.

    • NextToken (string) --

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

CreateConnection (updated) Link ¶
Changes (request)
{'HostArn': 'string', 'ProviderType': {'GitHubEnterpriseServer'}}

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

client.create_connection(
    ProviderType='Bitbucket'|'GitHubEnterpriseServer',
    ConnectionName='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    HostArn='string'
)
type ProviderType

string

param ProviderType

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

type ConnectionName

string

param ConnectionName

[REQUIRED]

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

type Tags

list

param Tags

The key-value pair to use when tagging the resource.

  • (dict) --

    A tag is a key-value pair that is used to manage the resource.

    This tag is available for use by AWS services that support tags.

    • Key (string) -- [REQUIRED]

      The tag's key.

    • Value (string) -- [REQUIRED]

      The tag's value.

type HostArn

string

param HostArn

The Amazon Resource Name (ARN) of the host associated with the connection to be created.

rtype

dict

returns

Response Syntax

{
    'ConnectionArn': 'string',
    'Tags': [
        {
            'Key': 'string',
            'Value': '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.

    • Tags (list) --

      Specifies the tags applied to the resource.

      • (dict) --

        A tag is a key-value pair that is used to manage the resource.

        This tag is available for use by AWS services that support tags.

        • Key (string) --

          The tag's key.

        • Value (string) --

          The tag's value.

GetConnection (updated) Link ¶
Changes (response)
{'Connection': {'HostArn': 'string',
                'ProviderType': {'GitHubEnterpriseServer'}}}

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

See also: AWS API Documentation

Request Syntax

client.get_connection(
    ConnectionArn='string'
)
type ConnectionArn

string

param ConnectionArn

[REQUIRED]

The Amazon Resource Name (ARN) of a connection.

rtype

dict

returns

Response Syntax

{
    'Connection': {
        'ConnectionName': 'string',
        'ConnectionArn': 'string',
        'ProviderType': 'Bitbucket'|'GitHubEnterpriseServer',
        'OwnerAccountId': 'string',
        'ConnectionStatus': 'PENDING'|'AVAILABLE'|'ERROR',
        'HostArn': 'string'
    }
}

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. The valid provider type is Bitbucket.

      • OwnerAccountId (string) --

        The identifier 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.

      • HostArn (string) --

        The Amazon Resource Name (ARN) of the host associated with the connection.

ListConnections (updated) Link ¶
Changes (request, response)
Request
{'HostArnFilter': 'string', 'ProviderTypeFilter': {'GitHubEnterpriseServer'}}
Response
{'Connections': {'HostArn': 'string',
                 'ProviderType': {'GitHubEnterpriseServer'}}}

Lists the connections associated with your account.

See also: AWS API Documentation

Request Syntax

client.list_connections(
    ProviderTypeFilter='Bitbucket'|'GitHubEnterpriseServer',
    HostArnFilter='string',
    MaxResults=123,
    NextToken='string'
)
type ProviderTypeFilter

string

param ProviderTypeFilter

Filters the list of connections to those associated with a specified provider, such as Bitbucket.

type HostArnFilter

string

param HostArnFilter

Filters the list of connections to those associated with a specified host.

type MaxResults

integer

param MaxResults

The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value.

type NextToken

string

param NextToken

The token that was returned from the previous ListConnections call, which can be used to return the next set of connections in the list.

rtype

dict

returns

Response Syntax

{
    'Connections': [
        {
            'ConnectionName': 'string',
            'ConnectionArn': 'string',
            'ProviderType': 'Bitbucket'|'GitHubEnterpriseServer',
            'OwnerAccountId': 'string',
            'ConnectionStatus': 'PENDING'|'AVAILABLE'|'ERROR',
            'HostArn': 'string'
        },
    ],
    '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) --

        A resource that is used to connect third-party source providers with services like AWS CodePipeline.

        Note: A connection created through CloudFormation, the CLI, or the SDK is in PENDING status by default. You can make its status AVAILABLE by updating the connection in the console.

        • 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. The valid provider type is Bitbucket.

        • OwnerAccountId (string) --

          The identifier 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.

        • HostArn (string) --

          The Amazon Resource Name (ARN) of the host associated with 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.