AWS CodeStar connections 2019-12-01
- Client: Aws\CodeStarconnections\CodeStarconnectionsClient
- Service ID: codestar-connections
- Version: 2019-12-01
This page describes the parameters and results for the operations of the AWS CodeStar connections (2019-12-01), and shows how to use the Aws\CodeStarconnections\CodeStarconnectionsClient object to call the described operations. This documentation is specific to the 2019-12-01 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName')
, where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */)
.
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */)
.
- CreateConnection ( array $params = [] )
Creates a connection that can then be given to other AWS services like CodePipeline so that it can access third-party code repositories.
- CreateHost ( array $params = [] )
Creates a resource that represents the infrastructure where a third-party provider is installed.
- DeleteConnection ( array $params = [] )
The connection to be deleted.
- DeleteHost ( array $params = [] )
The host to be deleted.
- GetConnection ( array $params = [] )
Returns the connection ARN and details such as status, owner, and provider type.
- GetHost ( array $params = [] )
Returns the host ARN and details such as status, provider type, endpoint, and, if applicable, the VPC configuration.
- ListConnections ( array $params = [] )
Lists the connections associated with your account.
- ListHosts ( array $params = [] )
Lists the hosts associated with your account.
- ListTagsForResource ( array $params = [] )
Gets the set of key-value pairs (metadata) that are used to manage the resource.
- TagResource ( array $params = [] )
Adds to or modifies the tags of the given resource.
- UntagResource ( array $params = [] )
Removes tags from an AWS resource.
- UpdateHost ( array $params = [] )
Updates a specified host with the provided configurations.
Paginators
Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:
Operations
CreateConnection
$result = $client->createConnection
([/* ... */]); $promise = $client->createConnectionAsync
([/* ... */]);
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.
Parameter Syntax
$result = $client->createConnection([ 'ConnectionName' => '<string>', // REQUIRED 'HostArn' => '<string>', 'ProviderType' => 'Bitbucket|GitHub|GitHubEnterpriseServer', 'Tags' => [ [ 'Key' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ]);
Parameter Details
Members
- ConnectionName
-
- Required: Yes
- Type: string
The name of the connection to be created. The name must be unique in the calling AWS account.
- HostArn
-
- Type: string
The Amazon Resource Name (ARN) of the host associated with the connection to be created.
- ProviderType
-
- Type: string
The name of the external provider where your third-party code repository is configured.
- Tags
-
- Type: Array of Tag structures
The key-value pair to use when tagging the resource.
Result Syntax
[ 'ConnectionArn' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], ]
Result Details
Members
- ConnectionArn
-
- Required: Yes
- Type: 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.
The ARN is never reused if the connection is deleted.
- Tags
-
- Type: Array of Tag structures
Specifies the tags applied to the resource.
Errors
-
Exceeded the maximum limit for connections.
-
Resource not found. Verify the connection resource ARN and try again.
-
Resource not found. Verify the ARN for the host resource and try again.
CreateHost
$result = $client->createHost
([/* ... */]); $promise = $client->createHostAsync
([/* ... */]);
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.
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.
Parameter Syntax
$result = $client->createHost([ 'Name' => '<string>', // REQUIRED 'ProviderEndpoint' => '<string>', // REQUIRED 'ProviderType' => 'Bitbucket|GitHub|GitHubEnterpriseServer', // REQUIRED 'Tags' => [ [ 'Key' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], 'VpcConfiguration' => [ 'SecurityGroupIds' => ['<string>', ...], // REQUIRED 'SubnetIds' => ['<string>', ...], // REQUIRED 'TlsCertificate' => '<string>', 'VpcId' => '<string>', // REQUIRED ], ]);
Parameter Details
Members
- Name
-
- Required: Yes
- Type: string
The name of the host to be created. The name must be unique in the calling AWS account.
- ProviderEndpoint
-
- Required: Yes
- Type: string
The endpoint of the infrastructure to be represented by the host after it is created.
- ProviderType
-
- Required: Yes
- Type: 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.
- Tags
-
- Type: Array of Tag structures
- VpcConfiguration
-
- Type: VpcConfiguration structure
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.
Result Syntax
[ 'HostArn' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], ]
Result Details
Members
- HostArn
-
- Type: string
The Amazon Resource Name (ARN) of the host to be created.
- Tags
-
- Type: Array of Tag structures
Errors
-
Exceeded the maximum limit for connections.
DeleteConnection
$result = $client->deleteConnection
([/* ... */]); $promise = $client->deleteConnectionAsync
([/* ... */]);
The connection to be deleted.
Parameter Syntax
$result = $client->deleteConnection([ 'ConnectionArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- ConnectionArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the connection to be deleted.
The ARN is never reused if the connection is deleted.
Result Syntax
[]
Result Details
Errors
-
Resource not found. Verify the connection resource ARN and try again.
DeleteHost
$result = $client->deleteHost
([/* ... */]); $promise = $client->deleteHostAsync
([/* ... */]);
The host to be deleted. Before you delete a host, all connections associated to the host must be deleted.
A host cannot be deleted if it is in the VPC_CONFIG_INITIALIZING or VPC_CONFIG_DELETING state.
Parameter Syntax
$result = $client->deleteHost([ 'HostArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- HostArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the host to be deleted.
Result Syntax
[]
Result Details
Errors
-
Resource not found. Verify the connection resource ARN and try again.
-
Resource not found. Verify the ARN for the host resource and try again.
GetConnection
$result = $client->getConnection
([/* ... */]); $promise = $client->getConnectionAsync
([/* ... */]);
Returns the connection ARN and details such as status, owner, and provider type.
Parameter Syntax
$result = $client->getConnection([ 'ConnectionArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- ConnectionArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of a connection.
Result Syntax
[ 'Connection' => [ 'ConnectionArn' => '<string>', 'ConnectionName' => '<string>', 'ConnectionStatus' => 'PENDING|AVAILABLE|ERROR', 'HostArn' => '<string>', 'OwnerAccountId' => '<string>', 'ProviderType' => 'Bitbucket|GitHub|GitHubEnterpriseServer', ], ]
Result Details
Members
- Connection
-
- Type: Connection structure
The connection details, such as status, owner, and provider type.
Errors
-
Resource not found. Verify the connection resource ARN and try again.
-
Resource not found. Verify the ARN for the host resource and try again.
GetHost
$result = $client->getHost
([/* ... */]); $promise = $client->getHostAsync
([/* ... */]);
Returns the host ARN and details such as status, provider type, endpoint, and, if applicable, the VPC configuration.
Parameter Syntax
$result = $client->getHost([ 'HostArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- HostArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the requested host.
Result Syntax
[ 'Name' => '<string>', 'ProviderEndpoint' => '<string>', 'ProviderType' => 'Bitbucket|GitHub|GitHubEnterpriseServer', 'Status' => '<string>', 'VpcConfiguration' => [ 'SecurityGroupIds' => ['<string>', ...], 'SubnetIds' => ['<string>', ...], 'TlsCertificate' => '<string>', 'VpcId' => '<string>', ], ]
Result Details
Members
- Name
-
- Type: string
The name of the requested host.
- ProviderEndpoint
-
- Type: string
The endpoint of the infrastructure represented by the requested host.
- ProviderType
-
- Type: string
The provider type of the requested host, such as GitHub Enterprise Server.
- Status
-
- Type: string
The status of the requested host.
- VpcConfiguration
-
- Type: VpcConfiguration structure
The VPC configuration of the requested host.
Errors
-
Resource not found. Verify the connection resource ARN and try again.
-
Resource not found. Verify the ARN for the host resource and try again.
ListConnections
$result = $client->listConnections
([/* ... */]); $promise = $client->listConnectionsAsync
([/* ... */]);
Lists the connections associated with your account.
Parameter Syntax
$result = $client->listConnections([ 'HostArnFilter' => '<string>', 'MaxResults' => <integer>, 'NextToken' => '<string>', 'ProviderTypeFilter' => 'Bitbucket|GitHub|GitHubEnterpriseServer', ]);
Parameter Details
Members
- HostArnFilter
-
- Type: string
Filters the list of connections to those associated with a specified host.
- MaxResults
-
- Type: int
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
-
- Type: 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. - ProviderTypeFilter
-
- Type: string
Filters the list of connections to those associated with a specified provider, such as Bitbucket.
Result Syntax
[ 'Connections' => [ [ 'ConnectionArn' => '<string>', 'ConnectionName' => '<string>', 'ConnectionStatus' => 'PENDING|AVAILABLE|ERROR', 'HostArn' => '<string>', 'OwnerAccountId' => '<string>', 'ProviderType' => 'Bitbucket|GitHub|GitHubEnterpriseServer', ], // ... ], 'NextToken' => '<string>', ]
Result Details
Members
- Connections
-
- Type: Array of Connection structures
A list of connections and the details for each connection, such as status, owner, and provider type.
- NextToken
-
- Type: 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 morenextToken
values are returned.
Errors
There are no errors described for this operation.
ListHosts
$result = $client->listHosts
([/* ... */]); $promise = $client->listHostsAsync
([/* ... */]);
Lists the hosts associated with your account.
Parameter Syntax
$result = $client->listHosts([ 'MaxResults' => <integer>, 'NextToken' => '<string>', ]);
Parameter Details
Members
- MaxResults
-
- Type: int
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
-
- Type: string
The token that was returned from the previous
ListHosts
call, which can be used to return the next set of hosts in the list.
Result Syntax
[ 'Hosts' => [ [ 'HostArn' => '<string>', 'Name' => '<string>', 'ProviderEndpoint' => '<string>', 'ProviderType' => 'Bitbucket|GitHub|GitHubEnterpriseServer', 'Status' => '<string>', 'StatusMessage' => '<string>', 'VpcConfiguration' => [ 'SecurityGroupIds' => ['<string>', ...], 'SubnetIds' => ['<string>', ...], 'TlsCertificate' => '<string>', 'VpcId' => '<string>', ], ], // ... ], 'NextToken' => '<string>', ]
Result Details
Members
- Hosts
-
- Type: Array of Host structures
A list of hosts and the details for each host, such as status, endpoint, and provider type.
- NextToken
-
- Type: 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 morenextToken
values are returned.
Errors
There are no errors described for this operation.
ListTagsForResource
$result = $client->listTagsForResource
([/* ... */]); $promise = $client->listTagsForResourceAsync
([/* ... */]);
Gets the set of key-value pairs (metadata) that are used to manage the resource.
Parameter Syntax
$result = $client->listTagsForResource([ 'ResourceArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- ResourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the resource for which you want to get information about tags, if any.
Result Syntax
[ 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], ]
Result Details
Members
- Tags
-
- Type: Array of Tag structures
A list of tag key and value pairs associated with the specified resource.
Errors
-
Resource not found. Verify the connection resource ARN and try again.
TagResource
$result = $client->tagResource
([/* ... */]); $promise = $client->tagResourceAsync
([/* ... */]);
Adds to or modifies the tags of the given resource. Tags are metadata that can be used to manage a resource.
Parameter Syntax
$result = $client->tagResource([ 'ResourceArn' => '<string>', // REQUIRED 'Tags' => [ // REQUIRED [ 'Key' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ]);
Parameter Details
Members
- ResourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the resource to which you want to add or update tags.
- Tags
-
- Required: Yes
- Type: Array of Tag structures
The tags you want to modify or add to the resource.
Result Syntax
[]
Result Details
Errors
-
Resource not found. Verify the connection resource ARN and try again.
-
Exceeded the maximum limit for connections.
UntagResource
$result = $client->untagResource
([/* ... */]); $promise = $client->untagResourceAsync
([/* ... */]);
Removes tags from an AWS resource.
Parameter Syntax
$result = $client->untagResource([ 'ResourceArn' => '<string>', // REQUIRED 'TagKeys' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- ResourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the resource to remove tags from.
- TagKeys
-
- Required: Yes
- Type: Array of strings
The list of keys for the tags to be removed from the resource.
Result Syntax
[]
Result Details
Errors
-
Resource not found. Verify the connection resource ARN and try again.
UpdateHost
$result = $client->updateHost
([/* ... */]); $promise = $client->updateHostAsync
([/* ... */]);
Updates a specified host with the provided configurations.
Parameter Syntax
$result = $client->updateHost([ 'HostArn' => '<string>', // REQUIRED 'ProviderEndpoint' => '<string>', 'VpcConfiguration' => [ 'SecurityGroupIds' => ['<string>', ...], // REQUIRED 'SubnetIds' => ['<string>', ...], // REQUIRED 'TlsCertificate' => '<string>', 'VpcId' => '<string>', // REQUIRED ], ]);
Parameter Details
Members
- HostArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the host to be updated.
- ProviderEndpoint
-
- Type: string
The URL or endpoint of the host to be updated.
- VpcConfiguration
-
- Type: VpcConfiguration structure
The VPC configuration of the host to be updated. A VPC must be configured and the infrastructure to be represented by the host must already be connected to the VPC.
Result Syntax
[]
Result Details
Errors
-
Two conflicting operations have been made on the same resource.
-
Resource not found. Verify the connection resource ARN and try again.
-
Resource not found. Verify the ARN for the host resource and try again.
-
UnsupportedOperationException:
The operation is not supported. Check the connection status and try again.
Shapes
ConflictException
Description
Two conflicting operations have been made on the same resource.
Members
- Message
-
- Type: string
Connection
Description
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.
Members
- ConnectionArn
-
- Type: 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.
The ARN is never reused if the connection is deleted.
- ConnectionName
-
- Type: string
The name of the connection. Connection names must be unique in an AWS user account.
- ConnectionStatus
-
- Type: string
The current status of the connection.
- HostArn
-
- Type: string
The Amazon Resource Name (ARN) of the host associated with the connection.
- OwnerAccountId
-
- Type: 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.
- ProviderType
-
- Type: string
The name of the external provider where your third-party code repository is configured.
Host
Description
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.
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.
Members
- HostArn
-
- Type: string
The Amazon Resource Name (ARN) of the host.
- Name
-
- Type: string
The name of the host.
- ProviderEndpoint
-
- Type: string
The endpoint of the infrastructure where your provider type is installed.
- ProviderType
-
- Type: 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.
- Status
-
- Type: string
The status of the host, such as PENDING, AVAILABLE, VPC_CONFIG_DELETING, VPC_CONFIG_INITIALIZING, and VPC_CONFIG_FAILED_INITIALIZATION.
- StatusMessage
-
- Type: string
The status description for the host.
- VpcConfiguration
-
- Type: VpcConfiguration structure
The VPC configuration provisioned for the host.
LimitExceededException
Description
Exceeded the maximum limit for connections.
Members
- Message
-
- Type: string
ResourceNotFoundException
Description
Resource not found. Verify the connection resource ARN and try again.
Members
- Message
-
- Type: string
ResourceUnavailableException
Description
Resource not found. Verify the ARN for the host resource and try again.
Members
- Message
-
- Type: string
Tag
Description
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.
Members
- Key
-
- Required: Yes
- Type: string
The tag's key.
- Value
-
- Required: Yes
- Type: string
The tag's value.
UnsupportedOperationException
Description
The operation is not supported. Check the connection status and try again.
Members
- Message
-
- Type: string
VpcConfiguration
Description
The VPC configuration provisioned for the host.
Members
- SecurityGroupIds
-
- Required: Yes
- Type: Array of strings
The ID of the security group or security groups associated with the Amazon VPC connected to the infrastructure where your provider type is installed.
- SubnetIds
-
- Required: Yes
- Type: Array of strings
The ID of the subnet or subnets associated with the Amazon VPC connected to the infrastructure where your provider type is installed.
- TlsCertificate
-
- Type: string
The value of the Transport Layer Security (TLS) certificate associated with the infrastructure where your provider type is installed.
- VpcId
-
- Required: Yes
- Type: string
The ID of the Amazon VPC connected to the infrastructure where your provider type is installed.