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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateInstrumentationConfigurationInput {
/// Type of instrumentation: BREAKPOINT (temporary) or PROBE (permanent)
pub instrumentation_type: ::std::option::Option<crate::types::InstrumentationType>,
/// <p>The name of the service to instrument. This should match the <code>service.name</code> resource attribute reported by the application.</p>
pub service: ::std::option::Option<::std::string::String>,
/// <p>The environment that the service is running in, such as <code>eks:cluster-prod/namespace</code> or <code>ec2:production</code>.</p>
pub environment: ::std::option::Option<::std::string::String>,
/// <p>The telemetry signal type to emit for this instrumentation. The supported value is <code>SNAPSHOT</code>.</p>
pub signal_type: ::std::option::Option<crate::types::DynamicInstrumentationSignalType>,
/// <p>The location where instrumentation should be applied. Specify a <code>CodeLocation</code> for code-level instrumentation.</p>
pub location: ::std::option::Option<crate::types::Location>,
/// <p>An optional short description (up to 50 characters) that explains the purpose of this instrumentation.</p>
pub description: ::std::option::Option<::std::string::String>,
/// For BREAKPOINT: optional, defaults to 24 hours, must be between 5 min and 24 hours. For PROBE: not supported. PROBE configurations are permanent and persist until explicitly deleted.
pub expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>Client-side filters that target specific instances. Each object in the array is AND-matched on its keys, and multiple objects are OR-matched to decide where to apply the instrumentation.</p>
pub attribute_filters: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
/// <p>Specifies what to capture when the instrumentation point is hit. Specify <code>CodeCapture</code> for code-level capture settings.</p>
pub capture_configuration: ::std::option::Option<crate::types::CaptureConfiguration>,
/// <p>An optional list of key-value pairs to associate with the instrumentation configuration. Tags can help you organize and categorize your resources.</p>
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateInstrumentationConfigurationInput {
/// Type of instrumentation: BREAKPOINT (temporary) or PROBE (permanent)
pub fn instrumentation_type(&self) -> ::std::option::Option<&crate::types::InstrumentationType> {
self.instrumentation_type.as_ref()
}
/// <p>The name of the service to instrument. This should match the <code>service.name</code> resource attribute reported by the application.</p>
pub fn service(&self) -> ::std::option::Option<&str> {
self.service.as_deref()
}
/// <p>The environment that the service is running in, such as <code>eks:cluster-prod/namespace</code> or <code>ec2:production</code>.</p>
pub fn environment(&self) -> ::std::option::Option<&str> {
self.environment.as_deref()
}
/// <p>The telemetry signal type to emit for this instrumentation. The supported value is <code>SNAPSHOT</code>.</p>
pub fn signal_type(&self) -> ::std::option::Option<&crate::types::DynamicInstrumentationSignalType> {
self.signal_type.as_ref()
}
/// <p>The location where instrumentation should be applied. Specify a <code>CodeLocation</code> for code-level instrumentation.</p>
pub fn location(&self) -> ::std::option::Option<&crate::types::Location> {
self.location.as_ref()
}
/// <p>An optional short description (up to 50 characters) that explains the purpose of this instrumentation.</p>
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
/// For BREAKPOINT: optional, defaults to 24 hours, must be between 5 min and 24 hours. For PROBE: not supported. PROBE configurations are permanent and persist until explicitly deleted.
pub fn expires_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.expires_at.as_ref()
}
/// <p>Client-side filters that target specific instances. Each object in the array is AND-matched on its keys, and multiple objects are OR-matched to decide where to apply the instrumentation.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.attribute_filters.is_none()`.
pub fn attribute_filters(&self) -> &[::std::collections::HashMap<::std::string::String, ::std::string::String>] {
self.attribute_filters.as_deref().unwrap_or_default()
}
/// <p>Specifies what to capture when the instrumentation point is hit. Specify <code>CodeCapture</code> for code-level capture settings.</p>
pub fn capture_configuration(&self) -> ::std::option::Option<&crate::types::CaptureConfiguration> {
self.capture_configuration.as_ref()
}
/// <p>An optional list of key-value pairs to associate with the instrumentation configuration. Tags can help you organize and categorize your resources.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
}
impl CreateInstrumentationConfigurationInput {
/// Creates a new builder-style object to manufacture [`CreateInstrumentationConfigurationInput`](crate::operation::create_instrumentation_configuration::CreateInstrumentationConfigurationInput).
pub fn builder() -> crate::operation::create_instrumentation_configuration::builders::CreateInstrumentationConfigurationInputBuilder {
crate::operation::create_instrumentation_configuration::builders::CreateInstrumentationConfigurationInputBuilder::default()
}
}
/// A builder for [`CreateInstrumentationConfigurationInput`](crate::operation::create_instrumentation_configuration::CreateInstrumentationConfigurationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateInstrumentationConfigurationInputBuilder {
pub(crate) instrumentation_type: ::std::option::Option<crate::types::InstrumentationType>,
pub(crate) service: ::std::option::Option<::std::string::String>,
pub(crate) environment: ::std::option::Option<::std::string::String>,
pub(crate) signal_type: ::std::option::Option<crate::types::DynamicInstrumentationSignalType>,
pub(crate) location: ::std::option::Option<crate::types::Location>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) attribute_filters: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
pub(crate) capture_configuration: ::std::option::Option<crate::types::CaptureConfiguration>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateInstrumentationConfigurationInputBuilder {
/// Type of instrumentation: BREAKPOINT (temporary) or PROBE (permanent)
/// This field is required.
pub fn instrumentation_type(mut self, input: crate::types::InstrumentationType) -> Self {
self.instrumentation_type = ::std::option::Option::Some(input);
self
}
/// Type of instrumentation: BREAKPOINT (temporary) or PROBE (permanent)
pub fn set_instrumentation_type(mut self, input: ::std::option::Option<crate::types::InstrumentationType>) -> Self {
self.instrumentation_type = input;
self
}
/// Type of instrumentation: BREAKPOINT (temporary) or PROBE (permanent)
pub fn get_instrumentation_type(&self) -> &::std::option::Option<crate::types::InstrumentationType> {
&self.instrumentation_type
}
/// <p>The name of the service to instrument. This should match the <code>service.name</code> resource attribute reported by the application.</p>
/// This field is required.
pub fn service(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.service = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the service to instrument. This should match the <code>service.name</code> resource attribute reported by the application.</p>
pub fn set_service(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.service = input;
self
}
/// <p>The name of the service to instrument. This should match the <code>service.name</code> resource attribute reported by the application.</p>
pub fn get_service(&self) -> &::std::option::Option<::std::string::String> {
&self.service
}
/// <p>The environment that the service is running in, such as <code>eks:cluster-prod/namespace</code> or <code>ec2:production</code>.</p>
/// This field is required.
pub fn environment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.environment = ::std::option::Option::Some(input.into());
self
}
/// <p>The environment that the service is running in, such as <code>eks:cluster-prod/namespace</code> or <code>ec2:production</code>.</p>
pub fn set_environment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.environment = input;
self
}
/// <p>The environment that the service is running in, such as <code>eks:cluster-prod/namespace</code> or <code>ec2:production</code>.</p>
pub fn get_environment(&self) -> &::std::option::Option<::std::string::String> {
&self.environment
}
/// <p>The telemetry signal type to emit for this instrumentation. The supported value is <code>SNAPSHOT</code>.</p>
/// This field is required.
pub fn signal_type(mut self, input: crate::types::DynamicInstrumentationSignalType) -> Self {
self.signal_type = ::std::option::Option::Some(input);
self
}
/// <p>The telemetry signal type to emit for this instrumentation. The supported value is <code>SNAPSHOT</code>.</p>
pub fn set_signal_type(mut self, input: ::std::option::Option<crate::types::DynamicInstrumentationSignalType>) -> Self {
self.signal_type = input;
self
}
/// <p>The telemetry signal type to emit for this instrumentation. The supported value is <code>SNAPSHOT</code>.</p>
pub fn get_signal_type(&self) -> &::std::option::Option<crate::types::DynamicInstrumentationSignalType> {
&self.signal_type
}
/// <p>The location where instrumentation should be applied. Specify a <code>CodeLocation</code> for code-level instrumentation.</p>
/// This field is required.
pub fn location(mut self, input: crate::types::Location) -> Self {
self.location = ::std::option::Option::Some(input);
self
}
/// <p>The location where instrumentation should be applied. Specify a <code>CodeLocation</code> for code-level instrumentation.</p>
pub fn set_location(mut self, input: ::std::option::Option<crate::types::Location>) -> Self {
self.location = input;
self
}
/// <p>The location where instrumentation should be applied. Specify a <code>CodeLocation</code> for code-level instrumentation.</p>
pub fn get_location(&self) -> &::std::option::Option<crate::types::Location> {
&self.location
}
/// <p>An optional short description (up to 50 characters) that explains the purpose of this instrumentation.</p>
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
/// <p>An optional short description (up to 50 characters) that explains the purpose of this instrumentation.</p>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// <p>An optional short description (up to 50 characters) that explains the purpose of this instrumentation.</p>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// For BREAKPOINT: optional, defaults to 24 hours, must be between 5 min and 24 hours. For PROBE: not supported. PROBE configurations are permanent and persist until explicitly deleted.
pub fn expires_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.expires_at = ::std::option::Option::Some(input);
self
}
/// For BREAKPOINT: optional, defaults to 24 hours, must be between 5 min and 24 hours. For PROBE: not supported. PROBE configurations are permanent and persist until explicitly deleted.
pub fn set_expires_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.expires_at = input;
self
}
/// For BREAKPOINT: optional, defaults to 24 hours, must be between 5 min and 24 hours. For PROBE: not supported. PROBE configurations are permanent and persist until explicitly deleted.
pub fn get_expires_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.expires_at
}
/// Appends an item to `attribute_filters`.
///
/// To override the contents of this collection use [`set_attribute_filters`](Self::set_attribute_filters).
///
/// <p>Client-side filters that target specific instances. Each object in the array is AND-matched on its keys, and multiple objects are OR-matched to decide where to apply the instrumentation.</p>
pub fn attribute_filters(mut self, input: ::std::collections::HashMap<::std::string::String, ::std::string::String>) -> Self {
let mut v = self.attribute_filters.unwrap_or_default();
v.push(input);
self.attribute_filters = ::std::option::Option::Some(v);
self
}
/// <p>Client-side filters that target specific instances. Each object in the array is AND-matched on its keys, and multiple objects are OR-matched to decide where to apply the instrumentation.</p>
pub fn set_attribute_filters(
mut self,
input: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
) -> Self {
self.attribute_filters = input;
self
}
/// <p>Client-side filters that target specific instances. Each object in the array is AND-matched on its keys, and multiple objects are OR-matched to decide where to apply the instrumentation.</p>
pub fn get_attribute_filters(
&self,
) -> &::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>> {
&self.attribute_filters
}
/// <p>Specifies what to capture when the instrumentation point is hit. Specify <code>CodeCapture</code> for code-level capture settings.</p>
/// This field is required.
pub fn capture_configuration(mut self, input: crate::types::CaptureConfiguration) -> Self {
self.capture_configuration = ::std::option::Option::Some(input);
self
}
/// <p>Specifies what to capture when the instrumentation point is hit. Specify <code>CodeCapture</code> for code-level capture settings.</p>
pub fn set_capture_configuration(mut self, input: ::std::option::Option<crate::types::CaptureConfiguration>) -> Self {
self.capture_configuration = input;
self
}
/// <p>Specifies what to capture when the instrumentation point is hit. Specify <code>CodeCapture</code> for code-level capture settings.</p>
pub fn get_capture_configuration(&self) -> &::std::option::Option<crate::types::CaptureConfiguration> {
&self.capture_configuration
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>An optional list of key-value pairs to associate with the instrumentation configuration. Tags can help you organize and categorize your resources.</p>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
/// <p>An optional list of key-value pairs to associate with the instrumentation configuration. Tags can help you organize and categorize your resources.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
/// <p>An optional list of key-value pairs to associate with the instrumentation configuration. Tags can help you organize and categorize your resources.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
/// Consumes the builder and constructs a [`CreateInstrumentationConfigurationInput`](crate::operation::create_instrumentation_configuration::CreateInstrumentationConfigurationInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::create_instrumentation_configuration::CreateInstrumentationConfigurationInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(
crate::operation::create_instrumentation_configuration::CreateInstrumentationConfigurationInput {
instrumentation_type: self.instrumentation_type,
service: self.service,
environment: self.environment,
signal_type: self.signal_type,
location: self.location,
description: self.description,
expires_at: self.expires_at,
attribute_filters: self.attribute_filters,
capture_configuration: self.capture_configuration,
tags: self.tags,
},
)
}
}