コード例 #1
0
ファイル: examples_test.go プロジェクト: acquia/fifo2kinesis
func ExampleSupport_AddCommunicationToCase() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := support.New(sess)

	params := &support.AddCommunicationToCaseInput{
		CommunicationBody: aws.String("CommunicationBody"), // Required
		AttachmentSetId:   aws.String("AttachmentSetId"),
		CaseId:            aws.String("CaseId"),
		CcEmailAddresses: []*string{
			aws.String("CcEmailAddress"), // Required
			// More values...
		},
	}
	resp, err := svc.AddCommunicationToCase(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
コード例 #2
0
ファイル: examples_test.go プロジェクト: acquia/fifo2kinesis
func ExampleSupport_CreateCase() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := support.New(sess)

	params := &support.CreateCaseInput{
		CommunicationBody: aws.String("CommunicationBody"), // Required
		Subject:           aws.String("Subject"),           // Required
		AttachmentSetId:   aws.String("AttachmentSetId"),
		CategoryCode:      aws.String("CategoryCode"),
		CcEmailAddresses: []*string{
			aws.String("CcEmailAddress"), // Required
			// More values...
		},
		IssueType:    aws.String("IssueType"),
		Language:     aws.String("Language"),
		ServiceCode:  aws.String("ServiceCode"),
		SeverityCode: aws.String("SeverityCode"),
	}
	resp, err := svc.CreateCase(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
コード例 #3
0
ファイル: examples_test.go プロジェクト: acquia/fifo2kinesis
func ExampleSupport_DescribeTrustedAdvisorCheckSummaries() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := support.New(sess)

	params := &support.DescribeTrustedAdvisorCheckSummariesInput{
		CheckIds: []*string{ // Required
			aws.String("String"), // Required
			// More values...
		},
	}
	resp, err := svc.DescribeTrustedAdvisorCheckSummaries(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
コード例 #4
0
ファイル: examples_test.go プロジェクト: acquia/fifo2kinesis
func ExampleSupport_DescribeCommunications() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := support.New(sess)

	params := &support.DescribeCommunicationsInput{
		CaseId:     aws.String("CaseId"), // Required
		AfterTime:  aws.String("AfterTime"),
		BeforeTime: aws.String("BeforeTime"),
		MaxResults: aws.Int64(1),
		NextToken:  aws.String("NextToken"),
	}
	resp, err := svc.DescribeCommunications(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
コード例 #5
0
ファイル: examples_test.go プロジェクト: acquia/fifo2kinesis
func ExampleSupport_AddAttachmentsToSet() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := support.New(sess)

	params := &support.AddAttachmentsToSetInput{
		Attachments: []*support.Attachment{ // Required
			{ // Required
				Data:     []byte("PAYLOAD"),
				FileName: aws.String("FileName"),
			},
			// More values...
		},
		AttachmentSetId: aws.String("AttachmentSetId"),
	}
	resp, err := svc.AddAttachmentsToSet(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
コード例 #6
0
ファイル: examples_test.go プロジェクト: reyco/aws-sdk-go
func ExampleSupport_DescribeTrustedAdvisorCheckSummaries() {
	svc := support.New(nil)

	params := &support.DescribeTrustedAdvisorCheckSummariesInput{
		CheckIDs: []*string{ // Required
			aws.String("String"), // Required
			// More values...
		},
	}
	resp, err := svc.DescribeTrustedAdvisorCheckSummaries(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, the SDK should always return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
コード例 #7
0
ファイル: examples_test.go プロジェクト: reyco/aws-sdk-go
func ExampleSupport_AddCommunicationToCase() {
	svc := support.New(nil)

	params := &support.AddCommunicationToCaseInput{
		CommunicationBody: aws.String("CommunicationBody"), // Required
		AttachmentSetID:   aws.String("AttachmentSetId"),
		CCEmailAddresses: []*string{
			aws.String("CcEmailAddress"), // Required
			// More values...
		},
		CaseID: aws.String("CaseId"),
	}
	resp, err := svc.AddCommunicationToCase(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, the SDK should always return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
コード例 #8
0
ファイル: examples_test.go プロジェクト: acquia/fifo2kinesis
func ExampleSupport_DescribeCases() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := support.New(sess)

	params := &support.DescribeCasesInput{
		AfterTime:  aws.String("AfterTime"),
		BeforeTime: aws.String("BeforeTime"),
		CaseIdList: []*string{
			aws.String("CaseId"), // Required
			// More values...
		},
		DisplayId:             aws.String("DisplayId"),
		IncludeCommunications: aws.Bool(true),
		IncludeResolvedCases:  aws.Bool(true),
		Language:              aws.String("Language"),
		MaxResults:            aws.Int64(1),
		NextToken:             aws.String("NextToken"),
	}
	resp, err := svc.DescribeCases(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
コード例 #9
0
ファイル: examples_test.go プロジェクト: reyco/aws-sdk-go
func ExampleSupport_AddAttachmentsToSet() {
	svc := support.New(nil)

	params := &support.AddAttachmentsToSetInput{
		Attachments: []*support.Attachment{ // Required
			{ // Required
				Data:     []byte("PAYLOAD"),
				FileName: aws.String("FileName"),
			},
			// More values...
		},
		AttachmentSetID: aws.String("AttachmentSetId"),
	}
	resp, err := svc.AddAttachmentsToSet(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, the SDK should always return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
コード例 #10
0
ファイル: examples_test.go プロジェクト: reyco/aws-sdk-go
func ExampleSupport_ResolveCase() {
	svc := support.New(nil)

	params := &support.ResolveCaseInput{
		CaseID: aws.String("CaseId"),
	}
	resp, err := svc.ResolveCase(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, the SDK should always return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
コード例 #11
0
ファイル: examples_test.go プロジェクト: reyco/aws-sdk-go
func ExampleSupport_DescribeCommunications() {
	svc := support.New(nil)

	params := &support.DescribeCommunicationsInput{
		CaseID:     aws.String("CaseId"), // Required
		AfterTime:  aws.String("AfterTime"),
		BeforeTime: aws.String("BeforeTime"),
		MaxResults: aws.Long(1),
		NextToken:  aws.String("NextToken"),
	}
	resp, err := svc.DescribeCommunications(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, the SDK should always return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
コード例 #12
0
ファイル: examples_test.go プロジェクト: acquia/fifo2kinesis
func ExampleSupport_DescribeServices() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := support.New(sess)

	params := &support.DescribeServicesInput{
		Language: aws.String("Language"),
		ServiceCodeList: []*string{
			aws.String("ServiceCode"), // Required
			// More values...
		},
	}
	resp, err := svc.DescribeServices(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
コード例 #13
0
ファイル: examples_test.go プロジェクト: Celluliodio/flannel
func ExampleSupport_DescribeTrustedAdvisorChecks() {
	svc := support.New(nil)

	params := &support.DescribeTrustedAdvisorChecksInput{
		Language: aws.String("String"), // Required
	}
	resp, err := svc.DescribeTrustedAdvisorChecks(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
コード例 #14
0
func ExampleSupport_DescribeAttachment() {
	svc := support.New(session.New())

	params := &support.DescribeAttachmentInput{
		AttachmentId: aws.String("AttachmentId"), // Required
	}
	resp, err := svc.DescribeAttachment(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
コード例 #15
0
func ExampleSupport_ResolveCase() {
	svc := support.New(session.New())

	params := &support.ResolveCaseInput{
		CaseId: aws.String("CaseId"),
	}
	resp, err := svc.ResolveCase(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
コード例 #16
0
func ExampleSupport_RefreshTrustedAdvisorCheck() {
	svc := support.New(session.New())

	params := &support.RefreshTrustedAdvisorCheckInput{
		CheckId: aws.String("String"), // Required
	}
	resp, err := svc.RefreshTrustedAdvisorCheck(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
コード例 #17
0
func ExampleSupport_DescribeSeverityLevels() {
	svc := support.New(session.New())

	params := &support.DescribeSeverityLevelsInput{
		Language: aws.String("Language"),
	}
	resp, err := svc.DescribeSeverityLevels(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
コード例 #18
0
ファイル: examples_test.go プロジェクト: Celluliodio/flannel
func ExampleSupport_DescribeTrustedAdvisorCheckRefreshStatuses() {
	svc := support.New(nil)

	params := &support.DescribeTrustedAdvisorCheckRefreshStatusesInput{
		CheckIds: []*string{ // Required
			aws.String("String"), // Required
			// More values...
		},
	}
	resp, err := svc.DescribeTrustedAdvisorCheckRefreshStatuses(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
コード例 #19
0
ファイル: examples_test.go プロジェクト: Talos208/aws-sdk-go
func ExampleSupport_DescribeCases() {
	svc := support.New(nil)

	params := &support.DescribeCasesInput{
		AfterTime:  aws.String("AfterTime"),
		BeforeTime: aws.String("BeforeTime"),
		CaseIDList: []*string{
			aws.String("CaseId"), // Required
			// More values...
		},
		DisplayID:             aws.String("DisplayId"),
		IncludeCommunications: aws.Bool(true),
		IncludeResolvedCases:  aws.Bool(true),
		Language:              aws.String("Language"),
		MaxResults:            aws.Int64(1),
		NextToken:             aws.String("NextToken"),
	}
	resp, err := svc.DescribeCases(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, the SDK should always return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.Prettify(resp))
}
コード例 #20
0
ファイル: client.go プロジェクト: jloper3/amazon-ecs-cli
func init() {
	Before("@support", func() {
		World["client"] = support.New(nil)
	})
}
コード例 #21
0
ファイル: interface_test.go プロジェクト: Celluliodio/flannel
func TestInterface(t *testing.T) {
	assert.Implements(t, (*supportiface.SupportAPI)(nil), support.New(nil))
}
コード例 #22
0
ファイル: client.go プロジェクト: Xercoy/aws-sdk-go
func init() {
	Before("@support", func() {
		World["client"] = support.New(smoke.Session)
	})
}
コード例 #23
0
func init() {
	gucumber.Before("@support", func() {
		gucumber.World["client"] = support.New(smoke.Session)
	})
}