mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
opentracing -> opencensus (#802)
* update vendor directory, add go.opencensus.io * update imports * oops * s/opentracing/opencensus/ & remove prometheus / zipkin stuff & remove old stats * the dep train rides again * fix gin build * deps from last guy * start in on the agent metrics * she builds * remove tags for now, cardinality error is fussing. subscribe instead of register * update to patched version of opencensus to proceed for now TODO switch to a release * meh fix imports * println debug the bad boys * lace it with the tags * update deps again * fix all inconsistent cardinality errors * add our own logger * fix init * fix oom measure * remove bugged removal code * fix s3 measures * fix prom handler nil
This commit is contained in:
43
vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go
generated
vendored
43
vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go
generated
vendored
@@ -55,8 +55,8 @@ func (c *Cloud9) CreateEnvironmentEC2Request(input *CreateEnvironmentEC2Input) (
|
||||
// CreateEnvironmentEC2 API operation for AWS Cloud9.
|
||||
//
|
||||
// Creates an AWS Cloud9 development environment, launches an Amazon Elastic
|
||||
// Compute Cloud (Amazon EC2) instance, and then hosts the environment on the
|
||||
// instance.
|
||||
// Compute Cloud (Amazon EC2) instance, and then connects from the instance
|
||||
// to the environment.
|
||||
//
|
||||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||||
// with awserr.Error's Code and Message methods to get detailed information about
|
||||
@@ -250,9 +250,8 @@ func (c *Cloud9) DeleteEnvironmentRequest(input *DeleteEnvironmentInput) (req *r
|
||||
|
||||
// DeleteEnvironment API operation for AWS Cloud9.
|
||||
//
|
||||
// Deletes an AWS Cloud9 development environment. If the environment is hosted
|
||||
// on an Amazon Elastic Compute Cloud (Amazon EC2) instance, also terminates
|
||||
// the instance.
|
||||
// Deletes an AWS Cloud9 development environment. If an Amazon EC2 instance
|
||||
// is connected to the environment, also terminates the instance.
|
||||
//
|
||||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||||
// with awserr.Error's Code and Message methods to get detailed information about
|
||||
@@ -1098,7 +1097,6 @@ func (c *Cloud9) UpdateEnvironmentMembershipWithContext(ctx aws.Context, input *
|
||||
return out, req.Send()
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentEC2Request
|
||||
type CreateEnvironmentEC2Input struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -1116,7 +1114,7 @@ type CreateEnvironmentEC2Input struct {
|
||||
// The description of the environment to create.
|
||||
Description *string `locationName:"description" type:"string"`
|
||||
|
||||
// The type of instance to host the environment on (for example, t2.micro).
|
||||
// The type of instance to connect to the environment (for example, t2.micro).
|
||||
//
|
||||
// InstanceType is a required field
|
||||
InstanceType *string `locationName:"instanceType" min:"5" type:"string" required:"true"`
|
||||
@@ -1215,7 +1213,6 @@ func (s *CreateEnvironmentEC2Input) SetSubnetId(v string) *CreateEnvironmentEC2I
|
||||
return s
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentEC2Result
|
||||
type CreateEnvironmentEC2Output struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -1239,7 +1236,6 @@ func (s *CreateEnvironmentEC2Output) SetEnvironmentId(v string) *CreateEnvironme
|
||||
return s
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentMembershipRequest
|
||||
type CreateEnvironmentMembershipInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -1312,7 +1308,6 @@ func (s *CreateEnvironmentMembershipInput) SetUserArn(v string) *CreateEnvironme
|
||||
return s
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentMembershipResult
|
||||
type CreateEnvironmentMembershipOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -1336,7 +1331,6 @@ func (s *CreateEnvironmentMembershipOutput) SetMembership(v *EnvironmentMember)
|
||||
return s
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironmentRequest
|
||||
type DeleteEnvironmentInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -1375,7 +1369,6 @@ func (s *DeleteEnvironmentInput) SetEnvironmentId(v string) *DeleteEnvironmentIn
|
||||
return s
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironmentMembershipRequest
|
||||
type DeleteEnvironmentMembershipInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -1429,7 +1422,6 @@ func (s *DeleteEnvironmentMembershipInput) SetUserArn(v string) *DeleteEnvironme
|
||||
return s
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironmentMembershipResult
|
||||
type DeleteEnvironmentMembershipOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
}
|
||||
@@ -1444,7 +1436,6 @@ func (s DeleteEnvironmentMembershipOutput) GoString() string {
|
||||
return s.String()
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironmentResult
|
||||
type DeleteEnvironmentOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
}
|
||||
@@ -1459,7 +1450,6 @@ func (s DeleteEnvironmentOutput) GoString() string {
|
||||
return s.String()
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentMembershipsRequest
|
||||
type DescribeEnvironmentMembershipsInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -1535,7 +1525,6 @@ func (s *DescribeEnvironmentMembershipsInput) SetUserArn(v string) *DescribeEnvi
|
||||
return s
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentMembershipsResult
|
||||
type DescribeEnvironmentMembershipsOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -1571,7 +1560,6 @@ func (s *DescribeEnvironmentMembershipsOutput) SetNextToken(v string) *DescribeE
|
||||
return s
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentStatusRequest
|
||||
type DescribeEnvironmentStatusInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -1610,7 +1598,6 @@ func (s *DescribeEnvironmentStatusInput) SetEnvironmentId(v string) *DescribeEnv
|
||||
return s
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentStatusResult
|
||||
type DescribeEnvironmentStatusOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -1657,11 +1644,10 @@ func (s *DescribeEnvironmentStatusOutput) SetStatus(v string) *DescribeEnvironme
|
||||
return s
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentsRequest
|
||||
type DescribeEnvironmentsInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// The IDs of invidividual environments to get information about.
|
||||
// The IDs of individual environments to get information about.
|
||||
//
|
||||
// EnvironmentIds is a required field
|
||||
EnvironmentIds []*string `locationName:"environmentIds" min:"1" type:"list" required:"true"`
|
||||
@@ -1699,7 +1685,6 @@ func (s *DescribeEnvironmentsInput) SetEnvironmentIds(v []*string) *DescribeEnvi
|
||||
return s
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentsResult
|
||||
type DescribeEnvironmentsOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -1724,7 +1709,6 @@ func (s *DescribeEnvironmentsOutput) SetEnvironments(v []*Environment) *Describe
|
||||
}
|
||||
|
||||
// Information about an AWS Cloud9 development environment.
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/Environment
|
||||
type Environment struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -1745,10 +1729,10 @@ type Environment struct {
|
||||
|
||||
// The type of environment. Valid values include the following:
|
||||
//
|
||||
// * ec2: An environment hosted on an Amazon Elastic Compute Cloud (Amazon
|
||||
// EC2) instance.
|
||||
// * ec2: An Amazon Elastic Compute Cloud (Amazon EC2) instance connects
|
||||
// to the environment.
|
||||
//
|
||||
// * ssh: An environment hosted on your own server.
|
||||
// * ssh: Your own server connects to the environment.
|
||||
Type *string `locationName:"type" type:"string" enum:"EnvironmentType"`
|
||||
}
|
||||
|
||||
@@ -1799,7 +1783,6 @@ func (s *Environment) SetType(v string) *Environment {
|
||||
}
|
||||
|
||||
// Information about an environment member for an AWS Cloud9 development environment.
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/EnvironmentMember
|
||||
type EnvironmentMember struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -1868,7 +1851,6 @@ func (s *EnvironmentMember) SetUserId(v string) *EnvironmentMember {
|
||||
return s
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/ListEnvironmentsRequest
|
||||
type ListEnvironmentsInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -1906,7 +1888,6 @@ func (s *ListEnvironmentsInput) SetNextToken(v string) *ListEnvironmentsInput {
|
||||
return s
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/ListEnvironmentsResult
|
||||
type ListEnvironmentsOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -1942,7 +1923,6 @@ func (s *ListEnvironmentsOutput) SetNextToken(v string) *ListEnvironmentsOutput
|
||||
return s
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UpdateEnvironmentRequest
|
||||
type UpdateEnvironmentInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -1954,7 +1934,7 @@ type UpdateEnvironmentInput struct {
|
||||
// EnvironmentId is a required field
|
||||
EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"`
|
||||
|
||||
// Any replacement name for the environment.
|
||||
// A replacement name for the environment.
|
||||
Name *string `locationName:"name" min:"1" type:"string"`
|
||||
}
|
||||
|
||||
@@ -2002,7 +1982,6 @@ func (s *UpdateEnvironmentInput) SetName(v string) *UpdateEnvironmentInput {
|
||||
return s
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UpdateEnvironmentMembershipRequest
|
||||
type UpdateEnvironmentMembershipInput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -2076,7 +2055,6 @@ func (s *UpdateEnvironmentMembershipInput) SetUserArn(v string) *UpdateEnvironme
|
||||
return s
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UpdateEnvironmentMembershipResult
|
||||
type UpdateEnvironmentMembershipOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -2100,7 +2078,6 @@ func (s *UpdateEnvironmentMembershipOutput) SetMembership(v *EnvironmentMember)
|
||||
return s
|
||||
}
|
||||
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UpdateEnvironmentResult
|
||||
type UpdateEnvironmentOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
}
|
||||
|
||||
16
vendor/github.com/aws/aws-sdk-go/service/cloud9/doc.go
generated
vendored
16
vendor/github.com/aws/aws-sdk-go/service/cloud9/doc.go
generated
vendored
@@ -6,24 +6,18 @@
|
||||
// AWS Cloud9 is a collection of tools that you can use to code, build, run,
|
||||
// test, debug, and release software in the cloud.
|
||||
//
|
||||
// In the background, these tools are available through development environments
|
||||
// running on Amazon Elastic Compute Cloud (Amazon EC2) instances (known as
|
||||
// Amazon EC2 environments), your own servers (known as SSH environments), or
|
||||
// a combination. This enables you to create and switch between multiple environments,
|
||||
// with each environment set up for a specific development project.
|
||||
//
|
||||
// For more information about AWS Cloud9, see the AWS Cloud9 User Guide.
|
||||
// For more information about AWS Cloud9, see the AWS Cloud9 User Guide (https://docs.aws.amazon.com/cloud9/latest/user-guide).
|
||||
//
|
||||
// AWS Cloud9 supports these operations:
|
||||
//
|
||||
// * CreateEnvironmentEC2: Creates an AWS Cloud9 development environment,
|
||||
// launches an Amazon EC2 instance, and then hosts the environment on the
|
||||
// instance.
|
||||
// launches an Amazon EC2 instance, and then connects from the instance to
|
||||
// the environment.
|
||||
//
|
||||
// * CreateEnvironmentMembership: Adds an environment member to an environment.
|
||||
//
|
||||
// * DeleteEnvironment: Deletes an environment. If the environment is hosted
|
||||
// on an Amazon EC2 instance, also terminates the instance.
|
||||
// * DeleteEnvironment: Deletes an environment. If an Amazon EC2 instance
|
||||
// is connected to the environment, also terminates the instance.
|
||||
//
|
||||
// * DeleteEnvironmentMembership: Deletes an environment member from an environment.
|
||||
//
|
||||
|
||||
537
vendor/github.com/aws/aws-sdk-go/service/cloud9/examples_test.go
generated
vendored
Normal file
537
vendor/github.com/aws/aws-sdk-go/service/cloud9/examples_test.go
generated
vendored
Normal file
@@ -0,0 +1,537 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloud9_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/cloud9"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ strings.Reader
|
||||
var _ aws.Config
|
||||
|
||||
func parseTime(layout, value string) *time.Time {
|
||||
t, err := time.Parse(layout, value)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return &t
|
||||
}
|
||||
|
||||
// CreateEnvironmentEC2
|
||||
//
|
||||
|
||||
func ExampleCloud9_CreateEnvironmentEC2_shared00() {
|
||||
svc := cloud9.New(session.New())
|
||||
input := &cloud9.CreateEnvironmentEC2Input{
|
||||
AutomaticStopTimeMinutes: aws.Int64(60),
|
||||
Description: aws.String("This is my demonstration environment."),
|
||||
InstanceType: aws.String("t2.micro"),
|
||||
Name: aws.String("my-demo-environment"),
|
||||
OwnerArn: aws.String("arn:aws:iam::123456789012:user/MyDemoUser"),
|
||||
SubnetId: aws.String("subnet-1fab8aEX"),
|
||||
}
|
||||
|
||||
result, err := svc.CreateEnvironmentEC2(input)
|
||||
if err != nil {
|
||||
if aerr, ok := err.(awserr.Error); ok {
|
||||
switch aerr.Code() {
|
||||
case cloud9.ErrCodeBadRequestException:
|
||||
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
|
||||
case cloud9.ErrCodeConflictException:
|
||||
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
|
||||
case cloud9.ErrCodeNotFoundException:
|
||||
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
|
||||
case cloud9.ErrCodeForbiddenException:
|
||||
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
|
||||
case cloud9.ErrCodeTooManyRequestsException:
|
||||
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
|
||||
case cloud9.ErrCodeLimitExceededException:
|
||||
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
|
||||
case cloud9.ErrCodeInternalServerErrorException:
|
||||
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
|
||||
default:
|
||||
fmt.Println(aerr.Error())
|
||||
}
|
||||
} else {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println(result)
|
||||
}
|
||||
|
||||
// CreateEnvironmentMembership
|
||||
//
|
||||
|
||||
func ExampleCloud9_CreateEnvironmentMembership_shared00() {
|
||||
svc := cloud9.New(session.New())
|
||||
input := &cloud9.CreateEnvironmentMembershipInput{
|
||||
EnvironmentId: aws.String("8d9967e2f0624182b74e7690ad69ebEX"),
|
||||
Permissions: aws.String("read-write"),
|
||||
UserArn: aws.String("arn:aws:iam::123456789012:user/AnotherDemoUser"),
|
||||
}
|
||||
|
||||
result, err := svc.CreateEnvironmentMembership(input)
|
||||
if err != nil {
|
||||
if aerr, ok := err.(awserr.Error); ok {
|
||||
switch aerr.Code() {
|
||||
case cloud9.ErrCodeBadRequestException:
|
||||
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
|
||||
case cloud9.ErrCodeConflictException:
|
||||
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
|
||||
case cloud9.ErrCodeNotFoundException:
|
||||
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
|
||||
case cloud9.ErrCodeForbiddenException:
|
||||
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
|
||||
case cloud9.ErrCodeTooManyRequestsException:
|
||||
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
|
||||
case cloud9.ErrCodeLimitExceededException:
|
||||
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
|
||||
case cloud9.ErrCodeInternalServerErrorException:
|
||||
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
|
||||
default:
|
||||
fmt.Println(aerr.Error())
|
||||
}
|
||||
} else {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println(result)
|
||||
}
|
||||
|
||||
// DeleteEnvironment
|
||||
//
|
||||
|
||||
func ExampleCloud9_DeleteEnvironment_shared00() {
|
||||
svc := cloud9.New(session.New())
|
||||
input := &cloud9.DeleteEnvironmentInput{
|
||||
EnvironmentId: aws.String("8d9967e2f0624182b74e7690ad69ebEX"),
|
||||
}
|
||||
|
||||
result, err := svc.DeleteEnvironment(input)
|
||||
if err != nil {
|
||||
if aerr, ok := err.(awserr.Error); ok {
|
||||
switch aerr.Code() {
|
||||
case cloud9.ErrCodeBadRequestException:
|
||||
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
|
||||
case cloud9.ErrCodeConflictException:
|
||||
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
|
||||
case cloud9.ErrCodeNotFoundException:
|
||||
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
|
||||
case cloud9.ErrCodeForbiddenException:
|
||||
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
|
||||
case cloud9.ErrCodeTooManyRequestsException:
|
||||
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
|
||||
case cloud9.ErrCodeLimitExceededException:
|
||||
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
|
||||
case cloud9.ErrCodeInternalServerErrorException:
|
||||
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
|
||||
default:
|
||||
fmt.Println(aerr.Error())
|
||||
}
|
||||
} else {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println(result)
|
||||
}
|
||||
|
||||
// DeleteEnvironmentMembership
|
||||
//
|
||||
|
||||
func ExampleCloud9_DeleteEnvironmentMembership_shared00() {
|
||||
svc := cloud9.New(session.New())
|
||||
input := &cloud9.DeleteEnvironmentMembershipInput{
|
||||
EnvironmentId: aws.String("8d9967e2f0624182b74e7690ad69ebEX"),
|
||||
UserArn: aws.String("arn:aws:iam::123456789012:user/AnotherDemoUser"),
|
||||
}
|
||||
|
||||
result, err := svc.DeleteEnvironmentMembership(input)
|
||||
if err != nil {
|
||||
if aerr, ok := err.(awserr.Error); ok {
|
||||
switch aerr.Code() {
|
||||
case cloud9.ErrCodeBadRequestException:
|
||||
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
|
||||
case cloud9.ErrCodeConflictException:
|
||||
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
|
||||
case cloud9.ErrCodeNotFoundException:
|
||||
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
|
||||
case cloud9.ErrCodeForbiddenException:
|
||||
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
|
||||
case cloud9.ErrCodeTooManyRequestsException:
|
||||
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
|
||||
case cloud9.ErrCodeLimitExceededException:
|
||||
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
|
||||
case cloud9.ErrCodeInternalServerErrorException:
|
||||
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
|
||||
default:
|
||||
fmt.Println(aerr.Error())
|
||||
}
|
||||
} else {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println(result)
|
||||
}
|
||||
|
||||
// DescribeEnvironmentMemberships1
|
||||
//
|
||||
// The following example gets information about all of the environment members for the
|
||||
// specified AWS Cloud9 development environment.
|
||||
func ExampleCloud9_DescribeEnvironmentMemberships_shared00() {
|
||||
svc := cloud9.New(session.New())
|
||||
input := &cloud9.DescribeEnvironmentMembershipsInput{
|
||||
EnvironmentId: aws.String("8d9967e2f0624182b74e7690ad69ebEX"),
|
||||
}
|
||||
|
||||
result, err := svc.DescribeEnvironmentMemberships(input)
|
||||
if err != nil {
|
||||
if aerr, ok := err.(awserr.Error); ok {
|
||||
switch aerr.Code() {
|
||||
case cloud9.ErrCodeBadRequestException:
|
||||
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
|
||||
case cloud9.ErrCodeConflictException:
|
||||
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
|
||||
case cloud9.ErrCodeNotFoundException:
|
||||
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
|
||||
case cloud9.ErrCodeForbiddenException:
|
||||
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
|
||||
case cloud9.ErrCodeTooManyRequestsException:
|
||||
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
|
||||
case cloud9.ErrCodeLimitExceededException:
|
||||
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
|
||||
case cloud9.ErrCodeInternalServerErrorException:
|
||||
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
|
||||
default:
|
||||
fmt.Println(aerr.Error())
|
||||
}
|
||||
} else {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println(result)
|
||||
}
|
||||
|
||||
// DescribeEnvironmentMemberships2
|
||||
//
|
||||
// The following example gets information about the owner of the specified AWS Cloud9
|
||||
// development environment.
|
||||
func ExampleCloud9_DescribeEnvironmentMemberships_shared01() {
|
||||
svc := cloud9.New(session.New())
|
||||
input := &cloud9.DescribeEnvironmentMembershipsInput{
|
||||
EnvironmentId: aws.String("8d9967e2f0624182b74e7690ad69ebEX"),
|
||||
Permissions: []*string{
|
||||
aws.String("owner"),
|
||||
},
|
||||
}
|
||||
|
||||
result, err := svc.DescribeEnvironmentMemberships(input)
|
||||
if err != nil {
|
||||
if aerr, ok := err.(awserr.Error); ok {
|
||||
switch aerr.Code() {
|
||||
case cloud9.ErrCodeBadRequestException:
|
||||
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
|
||||
case cloud9.ErrCodeConflictException:
|
||||
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
|
||||
case cloud9.ErrCodeNotFoundException:
|
||||
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
|
||||
case cloud9.ErrCodeForbiddenException:
|
||||
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
|
||||
case cloud9.ErrCodeTooManyRequestsException:
|
||||
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
|
||||
case cloud9.ErrCodeLimitExceededException:
|
||||
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
|
||||
case cloud9.ErrCodeInternalServerErrorException:
|
||||
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
|
||||
default:
|
||||
fmt.Println(aerr.Error())
|
||||
}
|
||||
} else {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println(result)
|
||||
}
|
||||
|
||||
// DescribeEnvironmentMemberships3
|
||||
//
|
||||
// The following example gets AWS Cloud9 development environment membership information
|
||||
// for the specified user.
|
||||
func ExampleCloud9_DescribeEnvironmentMemberships_shared02() {
|
||||
svc := cloud9.New(session.New())
|
||||
input := &cloud9.DescribeEnvironmentMembershipsInput{
|
||||
UserArn: aws.String("arn:aws:iam::123456789012:user/MyDemoUser"),
|
||||
}
|
||||
|
||||
result, err := svc.DescribeEnvironmentMemberships(input)
|
||||
if err != nil {
|
||||
if aerr, ok := err.(awserr.Error); ok {
|
||||
switch aerr.Code() {
|
||||
case cloud9.ErrCodeBadRequestException:
|
||||
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
|
||||
case cloud9.ErrCodeConflictException:
|
||||
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
|
||||
case cloud9.ErrCodeNotFoundException:
|
||||
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
|
||||
case cloud9.ErrCodeForbiddenException:
|
||||
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
|
||||
case cloud9.ErrCodeTooManyRequestsException:
|
||||
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
|
||||
case cloud9.ErrCodeLimitExceededException:
|
||||
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
|
||||
case cloud9.ErrCodeInternalServerErrorException:
|
||||
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
|
||||
default:
|
||||
fmt.Println(aerr.Error())
|
||||
}
|
||||
} else {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println(result)
|
||||
}
|
||||
|
||||
// DescribeEnvironmentStatus
|
||||
//
|
||||
|
||||
func ExampleCloud9_DescribeEnvironmentStatus_shared00() {
|
||||
svc := cloud9.New(session.New())
|
||||
input := &cloud9.DescribeEnvironmentStatusInput{
|
||||
EnvironmentId: aws.String("8d9967e2f0624182b74e7690ad69ebEX"),
|
||||
}
|
||||
|
||||
result, err := svc.DescribeEnvironmentStatus(input)
|
||||
if err != nil {
|
||||
if aerr, ok := err.(awserr.Error); ok {
|
||||
switch aerr.Code() {
|
||||
case cloud9.ErrCodeBadRequestException:
|
||||
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
|
||||
case cloud9.ErrCodeConflictException:
|
||||
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
|
||||
case cloud9.ErrCodeNotFoundException:
|
||||
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
|
||||
case cloud9.ErrCodeForbiddenException:
|
||||
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
|
||||
case cloud9.ErrCodeTooManyRequestsException:
|
||||
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
|
||||
case cloud9.ErrCodeLimitExceededException:
|
||||
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
|
||||
case cloud9.ErrCodeInternalServerErrorException:
|
||||
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
|
||||
default:
|
||||
fmt.Println(aerr.Error())
|
||||
}
|
||||
} else {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println(result)
|
||||
}
|
||||
|
||||
// DescribeEnvironments
|
||||
//
|
||||
|
||||
func ExampleCloud9_DescribeEnvironments_shared00() {
|
||||
svc := cloud9.New(session.New())
|
||||
input := &cloud9.DescribeEnvironmentsInput{
|
||||
EnvironmentIds: []*string{
|
||||
aws.String("8d9967e2f0624182b74e7690ad69ebEX"),
|
||||
aws.String("349c86d4579e4e7298d500ff57a6b2EX"),
|
||||
},
|
||||
}
|
||||
|
||||
result, err := svc.DescribeEnvironments(input)
|
||||
if err != nil {
|
||||
if aerr, ok := err.(awserr.Error); ok {
|
||||
switch aerr.Code() {
|
||||
case cloud9.ErrCodeBadRequestException:
|
||||
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
|
||||
case cloud9.ErrCodeConflictException:
|
||||
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
|
||||
case cloud9.ErrCodeNotFoundException:
|
||||
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
|
||||
case cloud9.ErrCodeForbiddenException:
|
||||
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
|
||||
case cloud9.ErrCodeTooManyRequestsException:
|
||||
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
|
||||
case cloud9.ErrCodeLimitExceededException:
|
||||
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
|
||||
case cloud9.ErrCodeInternalServerErrorException:
|
||||
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
|
||||
default:
|
||||
fmt.Println(aerr.Error())
|
||||
}
|
||||
} else {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println(result)
|
||||
}
|
||||
|
||||
// ListEnvironments
|
||||
//
|
||||
|
||||
func ExampleCloud9_ListEnvironments_shared00() {
|
||||
svc := cloud9.New(session.New())
|
||||
input := &cloud9.ListEnvironmentsInput{}
|
||||
|
||||
result, err := svc.ListEnvironments(input)
|
||||
if err != nil {
|
||||
if aerr, ok := err.(awserr.Error); ok {
|
||||
switch aerr.Code() {
|
||||
case cloud9.ErrCodeBadRequestException:
|
||||
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
|
||||
case cloud9.ErrCodeConflictException:
|
||||
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
|
||||
case cloud9.ErrCodeNotFoundException:
|
||||
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
|
||||
case cloud9.ErrCodeForbiddenException:
|
||||
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
|
||||
case cloud9.ErrCodeTooManyRequestsException:
|
||||
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
|
||||
case cloud9.ErrCodeLimitExceededException:
|
||||
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
|
||||
case cloud9.ErrCodeInternalServerErrorException:
|
||||
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
|
||||
default:
|
||||
fmt.Println(aerr.Error())
|
||||
}
|
||||
} else {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println(result)
|
||||
}
|
||||
|
||||
// UpdateEnvironment
|
||||
//
|
||||
|
||||
func ExampleCloud9_UpdateEnvironment_shared00() {
|
||||
svc := cloud9.New(session.New())
|
||||
input := &cloud9.UpdateEnvironmentInput{
|
||||
Description: aws.String("This is my changed demonstration environment."),
|
||||
EnvironmentId: aws.String("8d9967e2f0624182b74e7690ad69ebEX"),
|
||||
Name: aws.String("my-changed-demo-environment"),
|
||||
}
|
||||
|
||||
result, err := svc.UpdateEnvironment(input)
|
||||
if err != nil {
|
||||
if aerr, ok := err.(awserr.Error); ok {
|
||||
switch aerr.Code() {
|
||||
case cloud9.ErrCodeBadRequestException:
|
||||
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
|
||||
case cloud9.ErrCodeConflictException:
|
||||
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
|
||||
case cloud9.ErrCodeNotFoundException:
|
||||
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
|
||||
case cloud9.ErrCodeForbiddenException:
|
||||
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
|
||||
case cloud9.ErrCodeTooManyRequestsException:
|
||||
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
|
||||
case cloud9.ErrCodeLimitExceededException:
|
||||
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
|
||||
case cloud9.ErrCodeInternalServerErrorException:
|
||||
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
|
||||
default:
|
||||
fmt.Println(aerr.Error())
|
||||
}
|
||||
} else {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println(result)
|
||||
}
|
||||
|
||||
// UpdateEnvironmentMembership
|
||||
//
|
||||
|
||||
func ExampleCloud9_UpdateEnvironmentMembership_shared00() {
|
||||
svc := cloud9.New(session.New())
|
||||
input := &cloud9.UpdateEnvironmentMembershipInput{
|
||||
EnvironmentId: aws.String("8d9967e2f0624182b74e7690ad69ebEX"),
|
||||
Permissions: aws.String("read-only"),
|
||||
UserArn: aws.String("arn:aws:iam::123456789012:user/AnotherDemoUser"),
|
||||
}
|
||||
|
||||
result, err := svc.UpdateEnvironmentMembership(input)
|
||||
if err != nil {
|
||||
if aerr, ok := err.(awserr.Error); ok {
|
||||
switch aerr.Code() {
|
||||
case cloud9.ErrCodeBadRequestException:
|
||||
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
|
||||
case cloud9.ErrCodeConflictException:
|
||||
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
|
||||
case cloud9.ErrCodeNotFoundException:
|
||||
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
|
||||
case cloud9.ErrCodeForbiddenException:
|
||||
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
|
||||
case cloud9.ErrCodeTooManyRequestsException:
|
||||
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
|
||||
case cloud9.ErrCodeLimitExceededException:
|
||||
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
|
||||
case cloud9.ErrCodeInternalServerErrorException:
|
||||
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
|
||||
default:
|
||||
fmt.Println(aerr.Error())
|
||||
}
|
||||
} else {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println(result)
|
||||
}
|
||||
Reference in New Issue
Block a user