mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Upgrade AWS SDK to the latest version
This commit is contained in:
+1557
-241
File diff suppressed because it is too large
Load Diff
+18
-2
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package appstreamiface provides an interface to enable mocking the Amazon AppStream service client
|
||||
// for testing your code.
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
//
|
||||
// The best way to use this interface is so the SDK's service client's calls
|
||||
// can be stubbed out for unit testing your code with the SDK without needing
|
||||
// to inject custom request handlers into the the SDK's request pipeline.
|
||||
// to inject custom request handlers into the SDK's request pipeline.
|
||||
//
|
||||
// // myFunc uses an SDK service client to make a request to
|
||||
// // Amazon AppStream.
|
||||
@@ -64,6 +64,10 @@ type AppStreamAPI interface {
|
||||
AssociateFleetWithContext(aws.Context, *appstream.AssociateFleetInput, ...request.Option) (*appstream.AssociateFleetOutput, error)
|
||||
AssociateFleetRequest(*appstream.AssociateFleetInput) (*request.Request, *appstream.AssociateFleetOutput)
|
||||
|
||||
CreateDirectoryConfig(*appstream.CreateDirectoryConfigInput) (*appstream.CreateDirectoryConfigOutput, error)
|
||||
CreateDirectoryConfigWithContext(aws.Context, *appstream.CreateDirectoryConfigInput, ...request.Option) (*appstream.CreateDirectoryConfigOutput, error)
|
||||
CreateDirectoryConfigRequest(*appstream.CreateDirectoryConfigInput) (*request.Request, *appstream.CreateDirectoryConfigOutput)
|
||||
|
||||
CreateFleet(*appstream.CreateFleetInput) (*appstream.CreateFleetOutput, error)
|
||||
CreateFleetWithContext(aws.Context, *appstream.CreateFleetInput, ...request.Option) (*appstream.CreateFleetOutput, error)
|
||||
CreateFleetRequest(*appstream.CreateFleetInput) (*request.Request, *appstream.CreateFleetOutput)
|
||||
@@ -76,6 +80,10 @@ type AppStreamAPI interface {
|
||||
CreateStreamingURLWithContext(aws.Context, *appstream.CreateStreamingURLInput, ...request.Option) (*appstream.CreateStreamingURLOutput, error)
|
||||
CreateStreamingURLRequest(*appstream.CreateStreamingURLInput) (*request.Request, *appstream.CreateStreamingURLOutput)
|
||||
|
||||
DeleteDirectoryConfig(*appstream.DeleteDirectoryConfigInput) (*appstream.DeleteDirectoryConfigOutput, error)
|
||||
DeleteDirectoryConfigWithContext(aws.Context, *appstream.DeleteDirectoryConfigInput, ...request.Option) (*appstream.DeleteDirectoryConfigOutput, error)
|
||||
DeleteDirectoryConfigRequest(*appstream.DeleteDirectoryConfigInput) (*request.Request, *appstream.DeleteDirectoryConfigOutput)
|
||||
|
||||
DeleteFleet(*appstream.DeleteFleetInput) (*appstream.DeleteFleetOutput, error)
|
||||
DeleteFleetWithContext(aws.Context, *appstream.DeleteFleetInput, ...request.Option) (*appstream.DeleteFleetOutput, error)
|
||||
DeleteFleetRequest(*appstream.DeleteFleetInput) (*request.Request, *appstream.DeleteFleetOutput)
|
||||
@@ -84,6 +92,10 @@ type AppStreamAPI interface {
|
||||
DeleteStackWithContext(aws.Context, *appstream.DeleteStackInput, ...request.Option) (*appstream.DeleteStackOutput, error)
|
||||
DeleteStackRequest(*appstream.DeleteStackInput) (*request.Request, *appstream.DeleteStackOutput)
|
||||
|
||||
DescribeDirectoryConfigs(*appstream.DescribeDirectoryConfigsInput) (*appstream.DescribeDirectoryConfigsOutput, error)
|
||||
DescribeDirectoryConfigsWithContext(aws.Context, *appstream.DescribeDirectoryConfigsInput, ...request.Option) (*appstream.DescribeDirectoryConfigsOutput, error)
|
||||
DescribeDirectoryConfigsRequest(*appstream.DescribeDirectoryConfigsInput) (*request.Request, *appstream.DescribeDirectoryConfigsOutput)
|
||||
|
||||
DescribeFleets(*appstream.DescribeFleetsInput) (*appstream.DescribeFleetsOutput, error)
|
||||
DescribeFleetsWithContext(aws.Context, *appstream.DescribeFleetsInput, ...request.Option) (*appstream.DescribeFleetsOutput, error)
|
||||
DescribeFleetsRequest(*appstream.DescribeFleetsInput) (*request.Request, *appstream.DescribeFleetsOutput)
|
||||
@@ -124,6 +136,10 @@ type AppStreamAPI interface {
|
||||
StopFleetWithContext(aws.Context, *appstream.StopFleetInput, ...request.Option) (*appstream.StopFleetOutput, error)
|
||||
StopFleetRequest(*appstream.StopFleetInput) (*request.Request, *appstream.StopFleetOutput)
|
||||
|
||||
UpdateDirectoryConfig(*appstream.UpdateDirectoryConfigInput) (*appstream.UpdateDirectoryConfigOutput, error)
|
||||
UpdateDirectoryConfigWithContext(aws.Context, *appstream.UpdateDirectoryConfigInput, ...request.Option) (*appstream.UpdateDirectoryConfigOutput, error)
|
||||
UpdateDirectoryConfigRequest(*appstream.UpdateDirectoryConfigInput) (*request.Request, *appstream.UpdateDirectoryConfigOutput)
|
||||
|
||||
UpdateFleet(*appstream.UpdateFleetInput) (*appstream.UpdateFleetOutput, error)
|
||||
UpdateFleetWithContext(aws.Context, *appstream.UpdateFleetInput, ...request.Option) (*appstream.UpdateFleetOutput, error)
|
||||
UpdateFleetRequest(*appstream.UpdateFleetInput) (*request.Request, *appstream.UpdateFleetOutput)
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package appstream provides the client and types for making API
|
||||
// requests to Amazon AppStream.
|
||||
//
|
||||
// API documentation for Amazon AppStream 2.0.
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/appstream-2016-12-01 for more information on this service.
|
||||
//
|
||||
// See appstream package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/appstream/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To Amazon AppStream with the SDK use the New function to create
|
||||
// a new service client. With that client you can make API requests to the service.
|
||||
// These clients are safe to use concurrently.
|
||||
//
|
||||
// See the SDK's documentation for more information on how to use the SDK.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/
|
||||
//
|
||||
// See aws.Config documentation for more information on configuring SDK clients.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
|
||||
//
|
||||
// See the Amazon AppStream client AppStream for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/appstream/#New
|
||||
package appstream
|
||||
+19
-1
@@ -1,9 +1,27 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package appstream
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeConcurrentModificationException for service response error code
|
||||
// "ConcurrentModificationException".
|
||||
//
|
||||
// An API error occurred. Wait a few minutes and try again.
|
||||
ErrCodeConcurrentModificationException = "ConcurrentModificationException"
|
||||
|
||||
// ErrCodeIncompatibleImageException for service response error code
|
||||
// "IncompatibleImageException".
|
||||
//
|
||||
// The image does not support storage connectors.
|
||||
ErrCodeIncompatibleImageException = "IncompatibleImageException"
|
||||
|
||||
// ErrCodeInvalidParameterCombinationException for service response error code
|
||||
// "InvalidParameterCombinationException".
|
||||
//
|
||||
// Indicates an incorrect combination of parameters, or a missing parameter.
|
||||
ErrCodeInvalidParameterCombinationException = "InvalidParameterCombinationException"
|
||||
|
||||
// ErrCodeInvalidRoleException for service response error code
|
||||
// "InvalidRoleException".
|
||||
//
|
||||
|
||||
-453
@@ -1,453 +0,0 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package appstream_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/appstream"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleAppStream_AssociateFleet() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.AssociateFleetInput{
|
||||
FleetName: aws.String("String"), // Required
|
||||
StackName: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.AssociateFleet(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)
|
||||
}
|
||||
|
||||
func ExampleAppStream_CreateFleet() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.CreateFleetInput{
|
||||
ComputeCapacity: &appstream.ComputeCapacity{ // Required
|
||||
DesiredInstances: aws.Int64(1), // Required
|
||||
},
|
||||
ImageName: aws.String("String"), // Required
|
||||
InstanceType: aws.String("String"), // Required
|
||||
Name: aws.String("Name"), // Required
|
||||
Description: aws.String("Description"),
|
||||
DisconnectTimeoutInSeconds: aws.Int64(1),
|
||||
DisplayName: aws.String("DisplayName"),
|
||||
MaxUserDurationInSeconds: aws.Int64(1),
|
||||
VpcConfig: &appstream.VpcConfig{
|
||||
SubnetIds: []*string{ // Required
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
}
|
||||
resp, err := svc.CreateFleet(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)
|
||||
}
|
||||
|
||||
func ExampleAppStream_CreateStack() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.CreateStackInput{
|
||||
Name: aws.String("String"), // Required
|
||||
Description: aws.String("Description"),
|
||||
DisplayName: aws.String("DisplayName"),
|
||||
}
|
||||
resp, err := svc.CreateStack(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)
|
||||
}
|
||||
|
||||
func ExampleAppStream_CreateStreamingURL() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.CreateStreamingURLInput{
|
||||
FleetName: aws.String("String"), // Required
|
||||
StackName: aws.String("String"), // Required
|
||||
UserId: aws.String("UserId"), // Required
|
||||
ApplicationId: aws.String("String"),
|
||||
SessionContext: aws.String("String"),
|
||||
Validity: aws.Int64(1),
|
||||
}
|
||||
resp, err := svc.CreateStreamingURL(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)
|
||||
}
|
||||
|
||||
func ExampleAppStream_DeleteFleet() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.DeleteFleetInput{
|
||||
Name: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteFleet(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)
|
||||
}
|
||||
|
||||
func ExampleAppStream_DeleteStack() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.DeleteStackInput{
|
||||
Name: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteStack(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)
|
||||
}
|
||||
|
||||
func ExampleAppStream_DescribeFleets() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.DescribeFleetsInput{
|
||||
Names: []*string{
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
NextToken: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.DescribeFleets(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)
|
||||
}
|
||||
|
||||
func ExampleAppStream_DescribeImages() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.DescribeImagesInput{
|
||||
Names: []*string{
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeImages(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)
|
||||
}
|
||||
|
||||
func ExampleAppStream_DescribeSessions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.DescribeSessionsInput{
|
||||
FleetName: aws.String("String"), // Required
|
||||
StackName: aws.String("String"), // Required
|
||||
Limit: aws.Int64(1),
|
||||
NextToken: aws.String("String"),
|
||||
UserId: aws.String("UserId"),
|
||||
}
|
||||
resp, err := svc.DescribeSessions(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)
|
||||
}
|
||||
|
||||
func ExampleAppStream_DescribeStacks() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.DescribeStacksInput{
|
||||
Names: []*string{
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
NextToken: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.DescribeStacks(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)
|
||||
}
|
||||
|
||||
func ExampleAppStream_DisassociateFleet() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.DisassociateFleetInput{
|
||||
FleetName: aws.String("String"), // Required
|
||||
StackName: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.DisassociateFleet(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)
|
||||
}
|
||||
|
||||
func ExampleAppStream_ExpireSession() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.ExpireSessionInput{
|
||||
SessionId: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.ExpireSession(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)
|
||||
}
|
||||
|
||||
func ExampleAppStream_ListAssociatedFleets() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.ListAssociatedFleetsInput{
|
||||
StackName: aws.String("String"), // Required
|
||||
NextToken: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.ListAssociatedFleets(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)
|
||||
}
|
||||
|
||||
func ExampleAppStream_ListAssociatedStacks() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.ListAssociatedStacksInput{
|
||||
FleetName: aws.String("String"), // Required
|
||||
NextToken: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.ListAssociatedStacks(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)
|
||||
}
|
||||
|
||||
func ExampleAppStream_StartFleet() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.StartFleetInput{
|
||||
Name: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.StartFleet(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)
|
||||
}
|
||||
|
||||
func ExampleAppStream_StopFleet() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.StopFleetInput{
|
||||
Name: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.StopFleet(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)
|
||||
}
|
||||
|
||||
func ExampleAppStream_UpdateFleet() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.UpdateFleetInput{
|
||||
Name: aws.String("String"), // Required
|
||||
ComputeCapacity: &appstream.ComputeCapacity{
|
||||
DesiredInstances: aws.Int64(1), // Required
|
||||
},
|
||||
DeleteVpcConfig: aws.Bool(true),
|
||||
Description: aws.String("Description"),
|
||||
DisconnectTimeoutInSeconds: aws.Int64(1),
|
||||
DisplayName: aws.String("DisplayName"),
|
||||
ImageName: aws.String("String"),
|
||||
InstanceType: aws.String("String"),
|
||||
MaxUserDurationInSeconds: aws.Int64(1),
|
||||
VpcConfig: &appstream.VpcConfig{
|
||||
SubnetIds: []*string{ // Required
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
}
|
||||
resp, err := svc.UpdateFleet(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)
|
||||
}
|
||||
|
||||
func ExampleAppStream_UpdateStack() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.UpdateStackInput{
|
||||
Name: aws.String("String"), // Required
|
||||
Description: aws.String("Description"),
|
||||
DisplayName: aws.String("DisplayName"),
|
||||
}
|
||||
resp, err := svc.UpdateStack(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)
|
||||
}
|
||||
+7
-5
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package appstream
|
||||
|
||||
@@ -11,10 +11,12 @@ import (
|
||||
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
|
||||
)
|
||||
|
||||
// API documentation for Amazon AppStream 2.0.
|
||||
// The service client's operations are safe to be used concurrently.
|
||||
// It is not safe to mutate any of the client's properties though.
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/appstream-2016-12-01
|
||||
// AppStream provides the API operation methods for making requests to
|
||||
// Amazon AppStream. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// AppStream methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type AppStream struct {
|
||||
*client.Client
|
||||
}
|
||||
|
||||
+21
-11
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package appstream
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
|
||||
// WaitUntilFleetStarted uses the Amazon AppStream API operation
|
||||
// DescribeFleets to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// If the condition is not met within the max attempt window, an error will
|
||||
// be returned.
|
||||
func (c *AppStream) WaitUntilFleetStarted(input *DescribeFleetsInput) error {
|
||||
return c.WaitUntilFleetStartedWithContext(aws.BackgroundContext(), input)
|
||||
@@ -33,23 +33,28 @@ func (c *AppStream) WaitUntilFleetStartedWithContext(ctx aws.Context, input *Des
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathAllWaiterMatch, Argument: "fleets[].state",
|
||||
Matcher: request.PathAllWaiterMatch, Argument: "Fleets[].State",
|
||||
Expected: "ACTIVE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "fleets[].state",
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Fleets[].State",
|
||||
Expected: "PENDING_DEACTIVATE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "fleets[].state",
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Fleets[].State",
|
||||
Expected: "INACTIVE",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
req, _ := c.DescribeFleetsRequest(input)
|
||||
var inCpy *DescribeFleetsInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeFleetsRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
@@ -62,7 +67,7 @@ func (c *AppStream) WaitUntilFleetStartedWithContext(ctx aws.Context, input *Des
|
||||
|
||||
// WaitUntilFleetStopped uses the Amazon AppStream API operation
|
||||
// DescribeFleets to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// If the condition is not met within the max attempt window, an error will
|
||||
// be returned.
|
||||
func (c *AppStream) WaitUntilFleetStopped(input *DescribeFleetsInput) error {
|
||||
return c.WaitUntilFleetStoppedWithContext(aws.BackgroundContext(), input)
|
||||
@@ -84,23 +89,28 @@ func (c *AppStream) WaitUntilFleetStoppedWithContext(ctx aws.Context, input *Des
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathAllWaiterMatch, Argument: "fleets[].state",
|
||||
Matcher: request.PathAllWaiterMatch, Argument: "Fleets[].State",
|
||||
Expected: "INACTIVE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "fleets[].state",
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Fleets[].State",
|
||||
Expected: "PENDING_ACTIVATE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "fleets[].state",
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Fleets[].State",
|
||||
Expected: "ACTIVE",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
req, _ := c.DescribeFleetsRequest(input)
|
||||
var inCpy *DescribeFleetsInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeFleetsRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
|
||||
Reference in New Issue
Block a user