本文整理汇总了Golang中github.com/bluet-deps/aws-sdk-go/private/waiter.Waiter类的典型用法代码示例。如果您正苦于以下问题:Golang Waiter类的具体用法?Golang Waiter怎么用?Golang Waiter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Waiter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: WaitUntilReplicationGroupDeleted
func (c *ElastiCache) WaitUntilReplicationGroupDeleted(input *DescribeReplicationGroupsInput) error {
waiterCfg := waiter.Config{
Operation: "DescribeReplicationGroups",
Delay: 15,
MaxAttempts: 40,
Acceptors: []waiter.WaitAcceptor{
{
State: "success",
Matcher: "pathAll",
Argument: "ReplicationGroups[].Status",
Expected: "deleted",
},
{
State: "failure",
Matcher: "pathAny",
Argument: "ReplicationGroups[].Status",
Expected: "available",
},
{
State: "success",
Matcher: "error",
Argument: "",
Expected: "ReplicationGroupNotFoundFault",
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:34,代码来源:waiters.go
示例2: WaitUntilStackCreateComplete
func (c *CloudFormation) WaitUntilStackCreateComplete(input *DescribeStacksInput) error {
waiterCfg := waiter.Config{
Operation: "DescribeStacks",
Delay: 30,
MaxAttempts: 50,
Acceptors: []waiter.WaitAcceptor{
{
State: "success",
Matcher: "pathAll",
Argument: "Stacks[].StackStatus",
Expected: "CREATE_COMPLETE",
},
{
State: "failure",
Matcher: "pathAny",
Argument: "Stacks[].StackStatus",
Expected: "CREATE_FAILED",
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:28,代码来源:waiters.go
示例3: WaitUntilBucketExists
func (c *S3) WaitUntilBucketExists(input *HeadBucketInput) error {
waiterCfg := waiter.Config{
Operation: "HeadBucket",
Delay: 5,
MaxAttempts: 20,
Acceptors: []waiter.WaitAcceptor{
{
State: "success",
Matcher: "status",
Argument: "",
Expected: 200,
},
{
State: "success",
Matcher: "status",
Argument: "",
Expected: 403,
},
{
State: "retry",
Matcher: "status",
Argument: "",
Expected: 404,
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:34,代码来源:waiters.go
示例4: WaitUntilKeyPairExists
func (c *EC2) WaitUntilKeyPairExists(input *DescribeKeyPairsInput) error {
waiterCfg := waiter.Config{
Operation: "DescribeKeyPairs",
Delay: 5,
MaxAttempts: 6,
Acceptors: []waiter.WaitAcceptor{
{
State: "success",
Matcher: "pathAll",
Argument: "length(KeyPairs[].KeyName) > `0`",
Expected: true,
},
{
State: "retry",
Matcher: "error",
Argument: "",
Expected: "InvalidKeyPairNotFound",
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:28,代码来源:waiters.go
示例5: WaitUntilInstanceTerminated
func (c *EC2) WaitUntilInstanceTerminated(input *DescribeInstancesInput) error {
waiterCfg := waiter.Config{
Operation: "DescribeInstances",
Delay: 15,
MaxAttempts: 40,
Acceptors: []waiter.WaitAcceptor{
{
State: "success",
Matcher: "pathAll",
Argument: "Reservations[].Instances[].State.Name",
Expected: "terminated",
},
{
State: "failure",
Matcher: "pathAny",
Argument: "Reservations[].Instances[].State.Name",
Expected: "pending",
},
{
State: "failure",
Matcher: "pathAny",
Argument: "Reservations[].Instances[].State.Name",
Expected: "stopping",
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:34,代码来源:waiters.go
示例6: WaitUntilNetworkInterfaceAvailable
func (c *EC2) WaitUntilNetworkInterfaceAvailable(input *DescribeNetworkInterfacesInput) error {
waiterCfg := waiter.Config{
Operation: "DescribeNetworkInterfaces",
Delay: 20,
MaxAttempts: 10,
Acceptors: []waiter.WaitAcceptor{
{
State: "success",
Matcher: "pathAll",
Argument: "NetworkInterfaces[].Status",
Expected: "available",
},
{
State: "failure",
Matcher: "error",
Argument: "",
Expected: "InvalidNetworkInterfaceIDNotFound",
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:28,代码来源:waiters.go
示例7: WaitUntilInstanceExists
func (c *EC2) WaitUntilInstanceExists(input *DescribeInstancesInput) error {
waiterCfg := waiter.Config{
Operation: "DescribeInstances",
Delay: 5,
MaxAttempts: 40,
Acceptors: []waiter.WaitAcceptor{
{
State: "success",
Matcher: "status",
Argument: "",
Expected: 200,
},
{
State: "retry",
Matcher: "error",
Argument: "",
Expected: "InvalidInstanceIDNotFound",
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:28,代码来源:waiters.go
示例8: WaitUntilClusterAvailable
func (c *Redshift) WaitUntilClusterAvailable(input *DescribeClustersInput) error {
waiterCfg := waiter.Config{
Operation: "DescribeClusters",
Delay: 60,
MaxAttempts: 30,
Acceptors: []waiter.WaitAcceptor{
{
State: "success",
Matcher: "pathAll",
Argument: "Clusters[].ClusterStatus",
Expected: "available",
},
{
State: "failure",
Matcher: "pathAny",
Argument: "Clusters[].ClusterStatus",
Expected: "deleting",
},
{
State: "retry",
Matcher: "error",
Argument: "",
Expected: "ClusterNotFound",
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:34,代码来源:waiters.go
示例9: WaitUntilInstanceProfileExists
func (c *IAM) WaitUntilInstanceProfileExists(input *GetInstanceProfileInput) error {
waiterCfg := waiter.Config{
Operation: "GetInstanceProfile",
Delay: 1,
MaxAttempts: 40,
Acceptors: []waiter.WaitAcceptor{
{
State: "success",
Matcher: "status",
Argument: "",
Expected: 200,
},
{
State: "retry",
Matcher: "status",
Argument: "",
Expected: 404,
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:28,代码来源:waiters.go
示例10: WaitUntilJobComplete
func (c *ElasticTranscoder) WaitUntilJobComplete(input *ReadJobInput) error {
waiterCfg := waiter.Config{
Operation: "ReadJob",
Delay: 30,
MaxAttempts: 120,
Acceptors: []waiter.WaitAcceptor{
{
State: "success",
Matcher: "path",
Argument: "Job.Status",
Expected: "Complete",
},
{
State: "failure",
Matcher: "path",
Argument: "Job.Status",
Expected: "Canceled",
},
{
State: "failure",
Matcher: "path",
Argument: "Job.Status",
Expected: "Error",
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:34,代码来源:waiters.go
示例11: WaitUntilServicesInactive
func (c *ECS) WaitUntilServicesInactive(input *DescribeServicesInput) error {
waiterCfg := waiter.Config{
Operation: "DescribeServices",
Delay: 15,
MaxAttempts: 40,
Acceptors: []waiter.WaitAcceptor{
{
State: "failure",
Matcher: "pathAny",
Argument: "failures[].reason",
Expected: "MISSING",
},
{
State: "success",
Matcher: "pathAny",
Argument: "services[].status",
Expected: "INACTIVE",
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:28,代码来源:waiters.go
示例12: WaitUntilUserExists
func (c *IAM) WaitUntilUserExists(input *GetUserInput) error {
waiterCfg := waiter.Config{
Operation: "GetUser",
Delay: 1,
MaxAttempts: 20,
Acceptors: []waiter.WaitAcceptor{
{
State: "success",
Matcher: "status",
Argument: "",
Expected: 200,
},
{
State: "retry",
Matcher: "error",
Argument: "",
Expected: "NoSuchEntity",
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:28,代码来源:waiters.go
示例13: WaitUntilAppExists
func (c *OpsWorks) WaitUntilAppExists(input *DescribeAppsInput) error {
waiterCfg := waiter.Config{
Operation: "DescribeApps",
Delay: 1,
MaxAttempts: 40,
Acceptors: []waiter.WaitAcceptor{
{
State: "success",
Matcher: "status",
Argument: "",
Expected: 200,
},
{
State: "failure",
Matcher: "status",
Argument: "",
Expected: 400,
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:28,代码来源:waiters.go
示例14: WaitUntilTasksRunning
func (c *ECS) WaitUntilTasksRunning(input *DescribeTasksInput) error {
waiterCfg := waiter.Config{
Operation: "DescribeTasks",
Delay: 6,
MaxAttempts: 100,
Acceptors: []waiter.WaitAcceptor{
{
State: "failure",
Matcher: "pathAny",
Argument: "tasks[].lastStatus",
Expected: "STOPPED",
},
{
State: "failure",
Matcher: "pathAny",
Argument: "failures[].reason",
Expected: "MISSING",
},
{
State: "success",
Matcher: "pathAll",
Argument: "tasks[].lastStatus",
Expected: "RUNNING",
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:34,代码来源:waiters.go
示例15: WaitUntilCustomerGatewayAvailable
func (c *EC2) WaitUntilCustomerGatewayAvailable(input *DescribeCustomerGatewaysInput) error {
waiterCfg := waiter.Config{
Operation: "DescribeCustomerGateways",
Delay: 15,
MaxAttempts: 40,
Acceptors: []waiter.WaitAcceptor{
{
State: "success",
Matcher: "pathAll",
Argument: "CustomerGateways[].State",
Expected: "available",
},
{
State: "failure",
Matcher: "pathAny",
Argument: "CustomerGateways[].State",
Expected: "deleted",
},
{
State: "failure",
Matcher: "pathAny",
Argument: "CustomerGateways[].State",
Expected: "deleting",
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:34,代码来源:waiters.go
示例16: WaitUntilTableExists
func (c *DynamoDB) WaitUntilTableExists(input *DescribeTableInput) error {
waiterCfg := waiter.Config{
Operation: "DescribeTable",
Delay: 20,
MaxAttempts: 25,
Acceptors: []waiter.WaitAcceptor{
{
State: "success",
Matcher: "path",
Argument: "Table.TableStatus",
Expected: "ACTIVE",
},
{
State: "retry",
Matcher: "error",
Argument: "",
Expected: "ResourceNotFoundException",
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:28,代码来源:waiters.go
示例17: WaitUntilStepComplete
func (c *EMR) WaitUntilStepComplete(input *DescribeStepInput) error {
waiterCfg := waiter.Config{
Operation: "DescribeStep",
Delay: 30,
MaxAttempts: 60,
Acceptors: []waiter.WaitAcceptor{
{
State: "success",
Matcher: "path",
Argument: "Step.Status.State",
Expected: "COMPLETED",
},
{
State: "failure",
Matcher: "path",
Argument: "Step.Status.State",
Expected: "FAILED",
},
{
State: "failure",
Matcher: "path",
Argument: "Step.Status.State",
Expected: "CANCELLED",
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:34,代码来源:waiters.go
示例18: WaitUntilDeploymentSuccessful
func (c *OpsWorks) WaitUntilDeploymentSuccessful(input *DescribeDeploymentsInput) error {
waiterCfg := waiter.Config{
Operation: "DescribeDeployments",
Delay: 15,
MaxAttempts: 40,
Acceptors: []waiter.WaitAcceptor{
{
State: "success",
Matcher: "pathAll",
Argument: "Deployments[].Status",
Expected: "successful",
},
{
State: "failure",
Matcher: "pathAny",
Argument: "Deployments[].Status",
Expected: "failed",
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:28,代码来源:waiters.go
示例19: WaitUntilVaultExists
func (c *Glacier) WaitUntilVaultExists(input *DescribeVaultInput) error {
waiterCfg := waiter.Config{
Operation: "DescribeVault",
Delay: 3,
MaxAttempts: 15,
Acceptors: []waiter.WaitAcceptor{
{
State: "success",
Matcher: "status",
Argument: "",
Expected: 200,
},
{
State: "retry",
Matcher: "error",
Argument: "",
Expected: "ResourceNotFoundException",
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:28,代码来源:waiters.go
示例20: WaitUntilSnapshotAvailable
func (c *Redshift) WaitUntilSnapshotAvailable(input *DescribeClusterSnapshotsInput) error {
waiterCfg := waiter.Config{
Operation: "DescribeClusterSnapshots",
Delay: 15,
MaxAttempts: 20,
Acceptors: []waiter.WaitAcceptor{
{
State: "success",
Matcher: "pathAll",
Argument: "Snapshots[].Status",
Expected: "available",
},
{
State: "failure",
Matcher: "pathAny",
Argument: "Snapshots[].Status",
Expected: "failed",
},
{
State: "failure",
Matcher: "pathAny",
Argument: "Snapshots[].Status",
Expected: "deleted",
},
},
}
w := waiter.Waiter{
Client: c,
Input: input,
Config: waiterCfg,
}
return w.Wait()
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:34,代码来源:waiters.go
注:本文中的github.com/bluet-deps/aws-sdk-go/private/waiter.Waiter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论