aws-sdk-glacier 1.0.0.rc1 → 1.0.0.rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/aws-sdk-glacier.rb +2 -2
- data/lib/aws-sdk-glacier/account.rb +116 -118
- data/lib/aws-sdk-glacier/archive.rb +148 -150
- data/lib/aws-sdk-glacier/client.rb +2657 -2425
- data/lib/aws-sdk-glacier/client_api.rb +896 -898
- data/lib/aws-sdk-glacier/errors.rb +4 -13
- data/lib/aws-sdk-glacier/job.rb +300 -302
- data/lib/aws-sdk-glacier/multipart_upload.rb +228 -230
- data/lib/aws-sdk-glacier/notification.rb +151 -153
- data/lib/aws-sdk-glacier/resource.rb +61 -63
- data/lib/aws-sdk-glacier/types.rb +2207 -2045
- data/lib/aws-sdk-glacier/vault.rb +454 -456
- data/lib/aws-sdk-glacier/waiters.rb +76 -77
- metadata +2 -2
@@ -1,179 +1,177 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
end
|
8
|
+
module Aws::Glacier
|
9
|
+
class Notification
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(account_id, vault_name, options = {})
|
14
|
+
# @param [String] account_id
|
15
|
+
# @param [String] vault_name
|
16
|
+
# @option options [Client] :client
|
17
|
+
# @overload def initialize(options = {})
|
18
|
+
# @option options [required, String] :account_id
|
19
|
+
# @option options [required, String] :vault_name
|
20
|
+
# @option options [Client] :client
|
21
|
+
def initialize(*args)
|
22
|
+
options = Hash === args.last ? args.pop.dup : {}
|
23
|
+
@account_id = extract_account_id(args, options)
|
24
|
+
@vault_name = extract_vault_name(args, options)
|
25
|
+
@data = options.delete(:data)
|
26
|
+
@client = options.delete(:client) || Client.new(options)
|
27
|
+
end
|
29
28
|
|
30
|
-
|
29
|
+
# @!group Read-Only Attributes
|
31
30
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
# @return [String]
|
32
|
+
def account_id
|
33
|
+
@account_id
|
34
|
+
end
|
36
35
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
36
|
+
# @return [String]
|
37
|
+
def vault_name
|
38
|
+
@vault_name
|
39
|
+
end
|
41
40
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
41
|
+
# The Amazon Simple Notification Service (Amazon SNS) topic Amazon
|
42
|
+
# Resource Name (ARN).
|
43
|
+
# @return [String]
|
44
|
+
def sns_topic
|
45
|
+
data.sns_topic
|
46
|
+
end
|
48
47
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
48
|
+
# A list of one or more events for which Amazon Glacier will send a
|
49
|
+
# notification to the specified Amazon SNS topic.
|
50
|
+
# @return [Array<String>]
|
51
|
+
def events
|
52
|
+
data.events
|
53
|
+
end
|
55
54
|
|
56
|
-
|
55
|
+
# @!endgroup
|
57
56
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
57
|
+
# @return [Client]
|
58
|
+
def client
|
59
|
+
@client
|
60
|
+
end
|
62
61
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
62
|
+
# Loads, or reloads {#data} for the current {Notification}.
|
63
|
+
# Returns `self` making it possible to chain methods.
|
64
|
+
#
|
65
|
+
# notification.reload.data
|
66
|
+
#
|
67
|
+
# @return [self]
|
68
|
+
def load
|
69
|
+
resp = @client.get_vault_notifications(
|
70
|
+
account_id: @account_id,
|
71
|
+
vault_name: @vault_name
|
72
|
+
)
|
73
|
+
@data = resp.vaultnotificationconfig
|
74
|
+
self
|
75
|
+
end
|
76
|
+
alias :reload :load
|
77
|
+
|
78
|
+
# @return [Types::VaultNotificationConfig]
|
79
|
+
# Returns the data for this {Notification}. Calls
|
80
|
+
# {Client#get_vault_notifications} if {#data_loaded?} is `false`.
|
81
|
+
def data
|
82
|
+
load unless @data
|
83
|
+
@data
|
84
|
+
end
|
86
85
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
86
|
+
# @return [Boolean]
|
87
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
88
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
89
|
+
def data_loaded?
|
90
|
+
!!@data
|
91
|
+
end
|
93
92
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
93
|
+
# @!group Actions
|
94
|
+
|
95
|
+
# @example Request syntax with placeholder values
|
96
|
+
#
|
97
|
+
# notification.delete()
|
98
|
+
# @param [Hash] options ({})
|
99
|
+
# @return [EmptyStructure]
|
100
|
+
def delete(options = {})
|
101
|
+
options = options.merge(
|
102
|
+
account_id: @account_id,
|
103
|
+
vault_name: @vault_name
|
104
|
+
)
|
105
|
+
resp = @client.delete_vault_notifications(options)
|
106
|
+
resp.data
|
107
|
+
end
|
109
108
|
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
109
|
+
# @example Request syntax with placeholder values
|
110
|
+
#
|
111
|
+
# notification.set({
|
112
|
+
# vault_notification_config: {
|
113
|
+
# sns_topic: "string",
|
114
|
+
# events: ["string"],
|
115
|
+
# },
|
116
|
+
# })
|
117
|
+
# @param [Hash] options ({})
|
118
|
+
# @option options [Types::VaultNotificationConfig] :vault_notification_config
|
119
|
+
# Provides options for specifying notification configuration.
|
120
|
+
# @return [EmptyStructure]
|
121
|
+
def set(options = {})
|
122
|
+
options = options.merge(
|
123
|
+
account_id: @account_id,
|
124
|
+
vault_name: @vault_name
|
125
|
+
)
|
126
|
+
resp = @client.set_vault_notifications(options)
|
127
|
+
resp.data
|
128
|
+
end
|
130
129
|
|
131
|
-
|
130
|
+
# @!group Associations
|
132
131
|
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
132
|
+
# @return [Vault]
|
133
|
+
def vault
|
134
|
+
Vault.new(
|
135
|
+
account_id: @account_id,
|
136
|
+
name: @vault_name,
|
137
|
+
client: @client
|
138
|
+
)
|
139
|
+
end
|
141
140
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
end
|
141
|
+
# @deprecated
|
142
|
+
# @api private
|
143
|
+
def identifiers
|
144
|
+
{
|
145
|
+
account_id: @account_id,
|
146
|
+
vault_name: @vault_name
|
147
|
+
}
|
148
|
+
end
|
149
|
+
deprecated(:identifiers)
|
150
|
+
|
151
|
+
private
|
152
|
+
|
153
|
+
def extract_account_id(args, options)
|
154
|
+
value = args[0] || options.delete(:account_id)
|
155
|
+
case value
|
156
|
+
when String then value
|
157
|
+
when nil then raise ArgumentError, "missing required option :account_id"
|
158
|
+
else
|
159
|
+
msg = "expected :account_id to be a String, got #{value.class}"
|
160
|
+
raise ArgumentError, msg
|
163
161
|
end
|
162
|
+
end
|
164
163
|
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
end
|
164
|
+
def extract_vault_name(args, options)
|
165
|
+
value = args[1] || options.delete(:vault_name)
|
166
|
+
case value
|
167
|
+
when String then value
|
168
|
+
when nil then raise ArgumentError, "missing required option :vault_name"
|
169
|
+
else
|
170
|
+
msg = "expected :vault_name to be a String, got #{value.class}"
|
171
|
+
raise ArgumentError, msg
|
174
172
|
end
|
175
|
-
|
176
|
-
class Collection < Aws::Resources::Collection; end
|
177
173
|
end
|
174
|
+
|
175
|
+
class Collection < Aws::Resources::Collection; end
|
178
176
|
end
|
179
177
|
end
|
@@ -1,82 +1,80 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
|
10
|
-
class Resource
|
8
|
+
module Aws::Glacier
|
9
|
+
class Resource
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
# @param options ({})
|
12
|
+
# @option options [Client] :client
|
13
|
+
def initialize(options = {})
|
14
|
+
@client = options[:client] || Client.new(options)
|
15
|
+
end
|
17
16
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
# @return [Client]
|
18
|
+
def client
|
19
|
+
@client
|
20
|
+
end
|
22
21
|
|
23
|
-
|
22
|
+
# @!group Actions
|
24
23
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
24
|
+
# @example Request syntax with placeholder values
|
25
|
+
#
|
26
|
+
# vault = glacier.create_vault({
|
27
|
+
# vault_name: "string", # required
|
28
|
+
# })
|
29
|
+
# @param [Hash] options ({})
|
30
|
+
# @option options [required, String] :vault_name
|
31
|
+
# The name of the vault.
|
32
|
+
# @return [Vault]
|
33
|
+
def create_vault(options = {})
|
34
|
+
options = options.merge(account_id: "-")
|
35
|
+
resp = @client.create_vault(options)
|
36
|
+
Vault.new(
|
37
|
+
account_id: options[:account_id],
|
38
|
+
name: options[:vault_name],
|
39
|
+
client: @client
|
40
|
+
)
|
41
|
+
end
|
43
42
|
|
44
|
-
|
43
|
+
# @!group Associations
|
45
44
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
45
|
+
# @param [String] id
|
46
|
+
# @return [Account]
|
47
|
+
def account(id)
|
48
|
+
Account.new(
|
49
|
+
id: id,
|
50
|
+
client: @client
|
51
|
+
)
|
52
|
+
end
|
54
53
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
end
|
74
|
-
y.yield(batch)
|
54
|
+
# @example Request syntax with placeholder values
|
55
|
+
#
|
56
|
+
# glacier.vaults()
|
57
|
+
# @param [Hash] options ({})
|
58
|
+
# @return [Vault::Collection]
|
59
|
+
def vaults(options = {})
|
60
|
+
batches = Enumerator.new do |y|
|
61
|
+
options = options.merge(account_id: "-")
|
62
|
+
resp = @client.list_vaults(options)
|
63
|
+
resp.each_page do |page|
|
64
|
+
batch = []
|
65
|
+
page.data.vault_list.each do |v|
|
66
|
+
batch << Vault.new(
|
67
|
+
account_id: options[:account_id],
|
68
|
+
name: v.vault_name,
|
69
|
+
data: v,
|
70
|
+
client: @client
|
71
|
+
)
|
75
72
|
end
|
73
|
+
y.yield(batch)
|
76
74
|
end
|
77
|
-
Vault::Collection.new(batches)
|
78
75
|
end
|
79
|
-
|
76
|
+
Vault::Collection.new(batches)
|
80
77
|
end
|
78
|
+
|
81
79
|
end
|
82
80
|
end
|