-
Notifications
You must be signed in to change notification settings - Fork 623
/
api_op_DescribeLocationS3.go
136 lines (110 loc) · 4.13 KB
/
api_op_DescribeLocationS3.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package datasync
import (
"context"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
// DescribeLocationS3Request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationS3Request
type DescribeLocationS3Input struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the Amazon S3 bucket location to describe.
//
// LocationArn is a required field
LocationArn *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DescribeLocationS3Input) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeLocationS3Input) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "DescribeLocationS3Input"}
if s.LocationArn == nil {
invalidParams.Add(aws.NewErrParamRequired("LocationArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// DescribeLocationS3Response
// Please also see https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationS3Response
type DescribeLocationS3Output struct {
_ struct{} `type:"structure"`
// The time that the Amazon S3 bucket location was created.
CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"`
// The Amazon Resource Name (ARN) of the Amazon S3 bucket location.
LocationArn *string `type:"string"`
// The URL of the Amazon S3 location that was described.
LocationUri *string `type:"string"`
// The Amazon Resource Name (ARN) of the AWS Identity and Access Management
// (IAM) role that is used to access an Amazon S3 bucket.
//
// For detailed information about using such a role, see "https://docs.aws.amazon.com/datasync/latest/userguide/working-with-locations.html#create-s3-location"
// (Creating a Location for Amazon S3) in the AWS DataSync User Guide.
S3Config *S3Config `type:"structure"`
}
// String returns the string representation
func (s DescribeLocationS3Output) String() string {
return awsutil.Prettify(s)
}
const opDescribeLocationS3 = "DescribeLocationS3"
// DescribeLocationS3Request returns a request value for making API operation for
// AWS DataSync.
//
// Returns metadata, such as bucket name, about an Amazon S3 bucket location.
//
// // Example sending a request using DescribeLocationS3Request.
// req := client.DescribeLocationS3Request(params)
// resp, err := req.Send(context.TODO())
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationS3
func (c *Client) DescribeLocationS3Request(input *DescribeLocationS3Input) DescribeLocationS3Request {
op := &aws.Operation{
Name: opDescribeLocationS3,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeLocationS3Input{}
}
req := c.newRequest(op, input, &DescribeLocationS3Output{})
return DescribeLocationS3Request{Request: req, Input: input, Copy: c.DescribeLocationS3Request}
}
// DescribeLocationS3Request is the request type for the
// DescribeLocationS3 API operation.
type DescribeLocationS3Request struct {
*aws.Request
Input *DescribeLocationS3Input
Copy func(*DescribeLocationS3Input) DescribeLocationS3Request
}
// Send marshals and sends the DescribeLocationS3 API request.
func (r DescribeLocationS3Request) Send(ctx context.Context) (*DescribeLocationS3Response, error) {
r.Request.SetContext(ctx)
err := r.Request.Send()
if err != nil {
return nil, err
}
resp := &DescribeLocationS3Response{
DescribeLocationS3Output: r.Request.Data.(*DescribeLocationS3Output),
response: &aws.Response{Request: r.Request},
}
return resp, nil
}
// DescribeLocationS3Response is the response type for the
// DescribeLocationS3 API operation.
type DescribeLocationS3Response struct {
*DescribeLocationS3Output
response *aws.Response
}
// SDKResponseMetdata returns the response metadata for the
// DescribeLocationS3 request.
func (r *DescribeLocationS3Response) SDKResponseMetdata() *aws.Response {
return r.response
}