package codestarconnections
import "github.com/aws/aws-sdk-go-v2/service/codestarconnections"
Package codestarconnections provides the API client, operations, and parameter types for AWS CodeStar connections.
AWS CodeStar Connections This AWS CodeStar Connections API Reference provides descriptions and usage examples of the operations and data types for the AWS CodeStar Connections API. You can use the connections API to work with connections and installations. Connections are configurations that you use to connect AWS resources to external code repositories. Each connection is a resource that can be given to services such as CodePipeline to connect to a third-party repository such as Bitbucket. For example, you can add the connection in CodePipeline so that it triggers your pipeline when a code change is made to your third-party code repository. Each connection is named and associated with a unique ARN that is used to reference the connection. When you create a connection, the console initiates a third-party connection handshake. Installations are the apps that are used to conduct this handshake. For example, the installation for the Bitbucket provider type is the Bitbucket app. When you create a connection, you can choose an existing installation or create one. When you want to create a connection to an installed provider type such as GitHub Enterprise Server, you create a host for your connections. You can work with connections by calling:
* CreateConnection, which creates a uniquely named connection that can be referenced by services such as CodePipeline.
* DeleteConnection, which deletes the specified connection.
* GetConnection, which returns information about the connection, including the connection status.
* ListConnections, which lists the connections associated with your account.
You can work with hosts by calling:
* CreateHost, which creates a host that represents the infrastructure where your provider is installed.
* DeleteHost, which deletes the specified host.
* GetHost, which returns information about the host, including the setup status.
* ListHosts, which lists the hosts associated with your account.
You can work with tags in AWS CodeStar Connections by calling the following:
* ListTagsForResource, which gets information about AWS tags for a specified Amazon Resource Name (ARN) in AWS CodeStar Connections.
* TagResource, which adds or updates tags for a resource in AWS CodeStar Connections.
* UntagResource, which removes tags for a resource in AWS CodeStar Connections.
For information about how to use AWS CodeStar Connections, see the Developer Tools User Guide (https://docs.aws.amazon.com/dtconsole/latest/userguide/welcome-connections.html).
Index ¶
- Constants
- func NewDefaultEndpointResolver() *internalendpoints.Resolver
- func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)
- func WithEndpointResolver(v EndpointResolver) func(*Options)
- type Client
- func New(options Options, optFns ...func(*Options)) *Client
- func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client
- func (c *Client) CreateConnection(ctx context.Context, params *CreateConnectionInput, optFns ...func(*Options)) (*CreateConnectionOutput, error)
- func (c *Client) CreateHost(ctx context.Context, params *CreateHostInput, optFns ...func(*Options)) (*CreateHostOutput, error)
- func (c *Client) DeleteConnection(ctx context.Context, params *DeleteConnectionInput, optFns ...func(*Options)) (*DeleteConnectionOutput, error)
- func (c *Client) DeleteHost(ctx context.Context, params *DeleteHostInput, optFns ...func(*Options)) (*DeleteHostOutput, error)
- func (c *Client) GetConnection(ctx context.Context, params *GetConnectionInput, optFns ...func(*Options)) (*GetConnectionOutput, error)
- func (c *Client) GetHost(ctx context.Context, params *GetHostInput, optFns ...func(*Options)) (*GetHostOutput, error)
- func (c *Client) ListConnections(ctx context.Context, params *ListConnectionsInput, optFns ...func(*Options)) (*ListConnectionsOutput, error)
- func (c *Client) ListHosts(ctx context.Context, params *ListHostsInput, optFns ...func(*Options)) (*ListHostsOutput, error)
- func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error)
- func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error)
- func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error)
- func (c *Client) UpdateHost(ctx context.Context, params *UpdateHostInput, optFns ...func(*Options)) (*UpdateHostOutput, error)
- type CreateConnectionInput
- type CreateConnectionOutput
- type CreateHostInput
- type CreateHostOutput
- type DeleteConnectionInput
- type DeleteConnectionOutput
- type DeleteHostInput
- type DeleteHostOutput
- type EndpointResolver
- type EndpointResolverFunc
- type EndpointResolverOptions
- type GetConnectionInput
- type GetConnectionOutput
- type GetHostInput
- type GetHostOutput
- type HTTPClient
- type HTTPSignerV4
- type ListConnectionsAPIClient
- type ListConnectionsInput
- type ListConnectionsOutput
- type ListConnectionsPaginator
- func NewListConnectionsPaginator(client ListConnectionsAPIClient, params *ListConnectionsInput, optFns ...func(*ListConnectionsPaginatorOptions)) *ListConnectionsPaginator
- func (p *ListConnectionsPaginator) HasMorePages() bool
- func (p *ListConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListConnectionsOutput, error)
- type ListConnectionsPaginatorOptions
- type ListHostsAPIClient
- type ListHostsInput
- type ListHostsOutput
- type ListHostsPaginator
- func NewListHostsPaginator(client ListHostsAPIClient, params *ListHostsInput, optFns ...func(*ListHostsPaginatorOptions)) *ListHostsPaginator
- func (p *ListHostsPaginator) HasMorePages() bool
- func (p *ListHostsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListHostsOutput, error)
- type ListHostsPaginatorOptions
- type ListTagsForResourceInput
- type ListTagsForResourceOutput
- type Options
- type ResolveEndpoint
- func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, )
- func (*ResolveEndpoint) ID() string
- type TagResourceInput
- type TagResourceOutput
- type UntagResourceInput
- type UntagResourceOutput
- type UpdateHostInput
- type UpdateHostOutput
Constants ¶
const ServiceAPIVersion = "2019-12-01"
const ServiceID = "CodeStar connections"
Functions ¶
func NewDefaultEndpointResolver ¶
func NewDefaultEndpointResolver() *internalendpoints.Resolver
NewDefaultEndpointResolver constructs a new service endpoint resolver
func WithAPIOptions ¶
func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)
WithAPIOptions returns a functional option for setting the Client's APIOptions option.
func WithEndpointResolver ¶
func WithEndpointResolver(v EndpointResolver) func(*Options)
WithEndpointResolver returns a functional option for setting the Client's EndpointResolver option.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides the API client to make operations call for AWS CodeStar connections.
func New ¶
New returns an initialized Client based on the functional options. Provide additional functional options to further configure the behavior of the client, such as changing the client's endpoint or adding custom middleware behavior.
func NewFromConfig ¶
NewFromConfig returns a new client from the provided config.
func (*Client) CreateConnection ¶
func (c *Client) CreateConnection(ctx context.Context, params *CreateConnectionInput, optFns ...func(*Options)) (*CreateConnectionOutput, error)
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.
func (*Client) CreateHost ¶
func (c *Client) CreateHost(ctx context.Context, params *CreateHostInput, optFns ...func(*Options)) (*CreateHostOutput, error)
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.
func (*Client) DeleteConnection ¶
func (c *Client) DeleteConnection(ctx context.Context, params *DeleteConnectionInput, optFns ...func(*Options)) (*DeleteConnectionOutput, error)
The connection to be deleted.
func (*Client) DeleteHost ¶
func (c *Client) DeleteHost(ctx context.Context, params *DeleteHostInput, optFns ...func(*Options)) (*DeleteHostOutput, error)
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.
func (*Client) GetConnection ¶
func (c *Client) GetConnection(ctx context.Context, params *GetConnectionInput, optFns ...func(*Options)) (*GetConnectionOutput, error)
Returns the connection ARN and details such as status, owner, and provider type.
func (*Client) GetHost ¶
func (c *Client) GetHost(ctx context.Context, params *GetHostInput, optFns ...func(*Options)) (*GetHostOutput, error)
Returns the host ARN and details such as status, provider type, endpoint, and, if applicable, the VPC configuration.
func (*Client) ListConnections ¶
func (c *Client) ListConnections(ctx context.Context, params *ListConnectionsInput, optFns ...func(*Options)) (*ListConnectionsOutput, error)
Lists the connections associated with your account.
func (*Client) ListHosts ¶
func (c *Client) ListHosts(ctx context.Context, params *ListHostsInput, optFns ...func(*Options)) (*ListHostsOutput, error)
Lists the hosts associated with your account.
func (*Client) ListTagsForResource ¶
func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error)
Gets the set of key-value pairs (metadata) that are used to manage the resource.
func (*Client) TagResource ¶
func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error)
Adds to or modifies the tags of the given resource. Tags are metadata that can be used to manage a resource.
func (*Client) UntagResource ¶
func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error)
Removes tags from an AWS resource.
func (*Client) UpdateHost ¶
func (c *Client) UpdateHost(ctx context.Context, params *UpdateHostInput, optFns ...func(*Options)) (*UpdateHostOutput, error)
Updates a specified host with the provided configurations.
type CreateConnectionInput ¶
type CreateConnectionInput struct { // The name of the connection to be created. The name must be unique in the calling // AWS account. // // This member is required. ConnectionName *string // The Amazon Resource Name (ARN) of the host associated with the connection to be // created. HostArn *string // The name of the external provider where your third-party code repository is // configured. ProviderType types.ProviderType // The key-value pair to use when tagging the resource. Tags []types.Tag }
type CreateConnectionOutput ¶
type CreateConnectionOutput struct { // 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. // // This member is required. ConnectionArn *string // Specifies the tags applied to the resource. Tags []types.Tag // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type CreateHostInput ¶
type CreateHostInput struct { // The name of the host to be created. The name must be unique in the calling AWS // account. // // This member is required. Name *string // The endpoint of the infrastructure to be represented by the host after it is // created. // // This member is required. ProviderEndpoint *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. // // This member is required. ProviderType types.ProviderType // 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. VpcConfiguration *types.VpcConfiguration }
type CreateHostOutput ¶
type CreateHostOutput struct { // The Amazon Resource Name (ARN) of the host to be created. HostArn *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DeleteConnectionInput ¶
type DeleteConnectionInput struct { // The Amazon Resource Name (ARN) of the connection to be deleted. The ARN is never // reused if the connection is deleted. // // This member is required. ConnectionArn *string }
type DeleteConnectionOutput ¶
type DeleteConnectionOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DeleteHostInput ¶
type DeleteHostInput struct { // The Amazon Resource Name (ARN) of the host to be deleted. // // This member is required. HostArn *string }
type DeleteHostOutput ¶
type DeleteHostOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type EndpointResolver ¶
type EndpointResolver interface { ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) }
EndpointResolver interface for resolving service endpoints.
func EndpointResolverFromURL ¶
func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver
EndpointResolverFromURL returns an EndpointResolver configured using the provided endpoint url. By default, the resolved endpoint resolver uses the client region as signing region, and the endpoint source is set to EndpointSourceCustom.You can provide functional options to configure endpoint values for the resolved endpoint.
type EndpointResolverFunc ¶
type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)
EndpointResolverFunc is a helper utility that wraps a function so it satisfies the EndpointResolver interface. This is useful when you want to add additional endpoint resolving logic, or stub out specific endpoints with custom values.
func (EndpointResolverFunc) ResolveEndpoint ¶
func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error)
type EndpointResolverOptions ¶
type EndpointResolverOptions = internalendpoints.Options
EndpointResolverOptions is the service endpoint resolver options
type GetConnectionInput ¶
type GetConnectionInput struct { // The Amazon Resource Name (ARN) of a connection. // // This member is required. ConnectionArn *string }
type GetConnectionOutput ¶
type GetConnectionOutput struct { // The connection details, such as status, owner, and provider type. Connection *types.Connection // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type GetHostInput ¶
type GetHostInput struct { // The Amazon Resource Name (ARN) of the requested host. // // This member is required. HostArn *string }
type GetHostOutput ¶
type GetHostOutput struct { // The name of the requested host. Name *string // The endpoint of the infrastructure represented by the requested host. ProviderEndpoint *string // The provider type of the requested host, such as GitHub Enterprise Server. ProviderType types.ProviderType // The status of the requested host. Status *string // The VPC configuration of the requested host. VpcConfiguration *types.VpcConfiguration // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type HTTPClient ¶
type HTTPSignerV4 ¶
type HTTPSignerV4 interface { SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error }
type ListConnectionsAPIClient ¶
type ListConnectionsAPIClient interface { ListConnections(context.Context, *ListConnectionsInput, ...func(*Options)) (*ListConnectionsOutput, error) }
ListConnectionsAPIClient is a client that implements the ListConnections operation.
type ListConnectionsInput ¶
type ListConnectionsInput struct { // Filters the list of connections to those associated with a specified host. HostArnFilter *string // The maximum number of results to return in a single call. To retrieve the // remaining results, make another call with the returned nextToken value. MaxResults int32 // The token that was returned from the previous ListConnections call, which can be // used to return the next set of connections in the list. NextToken *string // Filters the list of connections to those associated with a specified provider, // such as Bitbucket. ProviderTypeFilter types.ProviderType }
type ListConnectionsOutput ¶
type ListConnectionsOutput struct { // A list of connections and the details for each connection, such as status, // owner, and provider type. Connections []types.Connection // 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. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type ListConnectionsPaginator ¶
type ListConnectionsPaginator struct {
// contains filtered or unexported fields
}
ListConnectionsPaginator is a paginator for ListConnections
func NewListConnectionsPaginator ¶
func NewListConnectionsPaginator(client ListConnectionsAPIClient, params *ListConnectionsInput, optFns ...func(*ListConnectionsPaginatorOptions)) *ListConnectionsPaginator
NewListConnectionsPaginator returns a new ListConnectionsPaginator
func (*ListConnectionsPaginator) HasMorePages ¶
func (p *ListConnectionsPaginator) HasMorePages() bool
HasMorePages returns a boolean indicating whether more pages are available
func (*ListConnectionsPaginator) NextPage ¶
func (p *ListConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListConnectionsOutput, error)
NextPage retrieves the next ListConnections page.
type ListConnectionsPaginatorOptions ¶
type ListConnectionsPaginatorOptions struct { // The maximum number of results to return in a single call. To retrieve the // remaining results, make another call with the returned nextToken value. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool }
ListConnectionsPaginatorOptions is the paginator options for ListConnections
type ListHostsAPIClient ¶
type ListHostsAPIClient interface { ListHosts(context.Context, *ListHostsInput, ...func(*Options)) (*ListHostsOutput, error) }
ListHostsAPIClient is a client that implements the ListHosts operation.
type ListHostsInput ¶
type ListHostsInput struct { // The maximum number of results to return in a single call. To retrieve the // remaining results, make another call with the returned nextToken value. MaxResults int32 // The token that was returned from the previous ListHosts call, which can be used // to return the next set of hosts in the list. NextToken *string }
type ListHostsOutput ¶
type ListHostsOutput struct { // A list of hosts and the details for each host, such as status, endpoint, and // provider type. Hosts []types.Host // 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. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type ListHostsPaginator ¶
type ListHostsPaginator struct {
// contains filtered or unexported fields
}
ListHostsPaginator is a paginator for ListHosts
func NewListHostsPaginator ¶
func NewListHostsPaginator(client ListHostsAPIClient, params *ListHostsInput, optFns ...func(*ListHostsPaginatorOptions)) *ListHostsPaginator
NewListHostsPaginator returns a new ListHostsPaginator
func (*ListHostsPaginator) HasMorePages ¶
func (p *ListHostsPaginator) HasMorePages() bool
HasMorePages returns a boolean indicating whether more pages are available
func (*ListHostsPaginator) NextPage ¶
func (p *ListHostsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListHostsOutput, error)
NextPage retrieves the next ListHosts page.
type ListHostsPaginatorOptions ¶
type ListHostsPaginatorOptions struct { // The maximum number of results to return in a single call. To retrieve the // remaining results, make another call with the returned nextToken value. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool }
ListHostsPaginatorOptions is the paginator options for ListHosts
type ListTagsForResourceInput ¶
type ListTagsForResourceInput struct { // The Amazon Resource Name (ARN) of the resource for which you want to get // information about tags, if any. // // This member is required. ResourceArn *string }
type ListTagsForResourceOutput ¶
type ListTagsForResourceOutput struct { // A list of tag key and value pairs associated with the specified resource. Tags []types.Tag // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type Options ¶
type Options struct { // Set of options to modify how an operation is invoked. These apply to all // operations invoked for this client. Use functional options on operation call to // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error // Configures the events that will be sent to the configured logger. ClientLogMode aws.ClientLogMode // The credentials object to use when signing requests. Credentials aws.CredentialsProvider // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions EndpointResolverOptions // The service endpoint resolver. EndpointResolver EndpointResolver // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 // The logger writer interface to write logging messages to. Logger logging.Logger // The region to send requests to. (Required) Region string // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient HTTPClient }
func (Options) Copy ¶
Copy creates a clone where the APIOptions list is deep copied.
type ResolveEndpoint ¶
type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions }
func (*ResolveEndpoint) HandleSerialize ¶
func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, )
func (*ResolveEndpoint) ID ¶
func (*ResolveEndpoint) ID() string
type TagResourceInput ¶
type TagResourceInput struct { // The Amazon Resource Name (ARN) of the resource to which you want to add or // update tags. // // This member is required. ResourceArn *string // The tags you want to modify or add to the resource. // // This member is required. Tags []types.Tag }
type TagResourceOutput ¶
type TagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type UntagResourceInput ¶
type UntagResourceInput struct { // The Amazon Resource Name (ARN) of the resource to remove tags from. // // This member is required. ResourceArn *string // The list of keys for the tags to be removed from the resource. // // This member is required. TagKeys []string }
type UntagResourceOutput ¶
type UntagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type UpdateHostInput ¶
type UpdateHostInput struct { // The Amazon Resource Name (ARN) of the host to be updated. // // This member is required. HostArn *string // The URL or endpoint of the host to be updated. ProviderEndpoint *string // 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. VpcConfiguration *types.VpcConfiguration }
type UpdateHostOutput ¶
type UpdateHostOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
Source Files ¶
api_client.go api_op_CreateConnection.go api_op_CreateHost.go api_op_DeleteConnection.go api_op_DeleteHost.go api_op_GetConnection.go api_op_GetHost.go api_op_ListConnections.go api_op_ListHosts.go api_op_ListTagsForResource.go api_op_TagResource.go api_op_UntagResource.go api_op_UpdateHost.go deserializers.go doc.go endpoints.go serializers.go validators.go
Directories ¶
Path | Synopsis |
---|---|
internal | |
types |
- Version
- v1.1.5
- Published
- Apr 8, 2021
- Platform
- js/wasm
- Imports
- 26 packages
- Last checked
- now –
Tools for package owners.