Ejemplo n.º 1
0
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 awserr := aws.Error(err); awserr != nil {
		// A service error occurred.
		fmt.Println("Error:", awserr.Code, awserr.Message)
	} else if err != nil {
		// A non-service error occurred.
		panic(err)
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Ejemplo n.º 2
0
func ExampleSupport_CreateCase() {
	svc := support.New(nil)

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

	if awserr := aws.Error(err); awserr != nil {
		// A service error occurred.
		fmt.Println("Error:", awserr.Code, awserr.Message)
	} else if err != nil {
		// A non-service error occurred.
		panic(err)
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Ejemplo n.º 3
0
func ExampleSupport_AddAttachmentsToSet() {
	svc := support.New(nil)

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

	if awserr := aws.Error(err); awserr != nil {
		// A service error occurred.
		fmt.Println("Error:", awserr.Code, awserr.Message)
	} else if err != nil {
		// A non-service error occurred.
		panic(err)
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Ejemplo n.º 4
0
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.Boolean(true),
		IncludeResolvedCases:  aws.Boolean(true),
		Language:              aws.String("Language"),
		MaxResults:            aws.Long(1),
		NextToken:             aws.String("NextToken"),
	}
	resp, err := svc.DescribeCases(params)

	if awserr := aws.Error(err); awserr != nil {
		// A service error occurred.
		fmt.Println("Error:", awserr.Code, awserr.Message)
	} else if err != nil {
		// A non-service error occurred.
		panic(err)
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Ejemplo n.º 5
0
func ExampleSupport_DescribeAttachment() {
	svc := support.New(nil)

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

	if awserr := aws.Error(err); awserr != nil {
		// A service error occurred.
		fmt.Println("Error:", awserr.Code, awserr.Message)
	} else if err != nil {
		// A non-service error occurred.
		panic(err)
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Ejemplo n.º 6
0
func ExampleSupport_ResolveCase() {
	svc := support.New(nil)

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

	if awserr := aws.Error(err); awserr != nil {
		// A service error occurred.
		fmt.Println("Error:", awserr.Code, awserr.Message)
	} else if err != nil {
		// A non-service error occurred.
		panic(err)
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Ejemplo n.º 7
0
func ExampleSupport_RefreshTrustedAdvisorCheck() {
	svc := support.New(nil)

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

	if awserr := aws.Error(err); awserr != nil {
		// A service error occurred.
		fmt.Println("Error:", awserr.Code, awserr.Message)
	} else if err != nil {
		// A non-service error occurred.
		panic(err)
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Ejemplo n.º 8
0
func ExampleSupport_DescribeSeverityLevels() {
	svc := support.New(nil)

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

	if awserr := aws.Error(err); awserr != nil {
		// A service error occurred.
		fmt.Println("Error:", awserr.Code, awserr.Message)
	} else if err != nil {
		// A non-service error occurred.
		panic(err)
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Ejemplo n.º 9
0
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 awserr := aws.Error(err); awserr != nil {
		// A service error occurred.
		fmt.Println("Error:", awserr.Code, awserr.Message)
	} else if err != nil {
		// A non-service error occurred.
		panic(err)
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Ejemplo n.º 10
0
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 awserr := aws.Error(err); awserr != nil {
		// A service error occurred.
		fmt.Println("Error:", awserr.Code, awserr.Message)
	} else if err != nil {
		// A non-service error occurred.
		panic(err)
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}