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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>CreateAgentRequest</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateAgentInput {
/// <p>Your agent activation key. You can get the activation key either by sending an HTTP GET request with redirects that enable you to get the agent IP address (port 80). Alternatively, you can get it from the DataSync console.</p>
/// <p>The redirect URL returned in the response provides you the activation key for your agent in the query string parameter <code>activationKey</code>. It might also include other activation-related parameters; however, these are merely defaults. The arguments you pass to this API call determine the actual configuration of your agent.</p>
/// <p>For more information, see Activating an Agent in the <i>DataSync User Guide.</i> </p>
#[doc(hidden)]
pub activation_key: ::std::option::Option<::std::string::String>,
/// <p>The name you configured for your agent. This value is a text reference that is used to identify the agent in the console.</p>
#[doc(hidden)]
pub agent_name: ::std::option::Option<::std::string::String>,
/// <p>The key-value pair that represents the tag that you want to associate with the agent. The value can be an empty string. This value helps you manage, filter, and search for your agents.</p> <note>
/// <p>Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @. </p>
/// </note>
#[doc(hidden)]
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::TagListEntry>>,
/// <p>The ID of the VPC (virtual private cloud) endpoint that the agent has access to. This is the client-side VPC endpoint, also called a PrivateLink. If you don't have a PrivateLink VPC endpoint, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html#create-endpoint-service">Creating a VPC Endpoint Service Configuration</a> in the Amazon VPC User Guide.</p>
/// <p>VPC endpoint ID looks like this: <code>vpce-01234d5aff67890e1</code>.</p>
#[doc(hidden)]
pub vpc_endpoint_id: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Names (ARNs) of the subnets in which DataSync will create elastic network interfaces for each data transfer task. The agent that runs a task must be private. When you start a task that is associated with an agent created in a VPC, or one that has access to an IP address in a VPC, then the task is also private. In this case, DataSync creates four network interfaces for each task in your subnet. For a data transfer to work, the agent must be able to route to all these four network interfaces.</p>
#[doc(hidden)]
pub subnet_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>The ARNs of the security groups used to protect your data transfer task subnets. See <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_Ec2Config.html#DataSync-Type-Ec2Config-SecurityGroupArns">SecurityGroupArns</a>.</p>
#[doc(hidden)]
pub security_group_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl CreateAgentInput {
/// <p>Your agent activation key. You can get the activation key either by sending an HTTP GET request with redirects that enable you to get the agent IP address (port 80). Alternatively, you can get it from the DataSync console.</p>
/// <p>The redirect URL returned in the response provides you the activation key for your agent in the query string parameter <code>activationKey</code>. It might also include other activation-related parameters; however, these are merely defaults. The arguments you pass to this API call determine the actual configuration of your agent.</p>
/// <p>For more information, see Activating an Agent in the <i>DataSync User Guide.</i> </p>
pub fn activation_key(&self) -> ::std::option::Option<&str> {
self.activation_key.as_deref()
}
/// <p>The name you configured for your agent. This value is a text reference that is used to identify the agent in the console.</p>
pub fn agent_name(&self) -> ::std::option::Option<&str> {
self.agent_name.as_deref()
}
/// <p>The key-value pair that represents the tag that you want to associate with the agent. The value can be an empty string. This value helps you manage, filter, and search for your agents.</p> <note>
/// <p>Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @. </p>
/// </note>
pub fn tags(&self) -> ::std::option::Option<&[crate::types::TagListEntry]> {
self.tags.as_deref()
}
/// <p>The ID of the VPC (virtual private cloud) endpoint that the agent has access to. This is the client-side VPC endpoint, also called a PrivateLink. If you don't have a PrivateLink VPC endpoint, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html#create-endpoint-service">Creating a VPC Endpoint Service Configuration</a> in the Amazon VPC User Guide.</p>
/// <p>VPC endpoint ID looks like this: <code>vpce-01234d5aff67890e1</code>.</p>
pub fn vpc_endpoint_id(&self) -> ::std::option::Option<&str> {
self.vpc_endpoint_id.as_deref()
}
/// <p>The Amazon Resource Names (ARNs) of the subnets in which DataSync will create elastic network interfaces for each data transfer task. The agent that runs a task must be private. When you start a task that is associated with an agent created in a VPC, or one that has access to an IP address in a VPC, then the task is also private. In this case, DataSync creates four network interfaces for each task in your subnet. For a data transfer to work, the agent must be able to route to all these four network interfaces.</p>
pub fn subnet_arns(&self) -> ::std::option::Option<&[::std::string::String]> {
self.subnet_arns.as_deref()
}
/// <p>The ARNs of the security groups used to protect your data transfer task subnets. See <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_Ec2Config.html#DataSync-Type-Ec2Config-SecurityGroupArns">SecurityGroupArns</a>.</p>
pub fn security_group_arns(&self) -> ::std::option::Option<&[::std::string::String]> {
self.security_group_arns.as_deref()
}
}
impl CreateAgentInput {
/// Creates a new builder-style object to manufacture [`CreateAgentInput`](crate::operation::create_agent::CreateAgentInput).
pub fn builder() -> crate::operation::create_agent::builders::CreateAgentInputBuilder {
crate::operation::create_agent::builders::CreateAgentInputBuilder::default()
}
}
/// A builder for [`CreateAgentInput`](crate::operation::create_agent::CreateAgentInput).
#[non_exhaustive]
#[derive(
::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug,
)]
pub struct CreateAgentInputBuilder {
pub(crate) activation_key: ::std::option::Option<::std::string::String>,
pub(crate) agent_name: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::TagListEntry>>,
pub(crate) vpc_endpoint_id: ::std::option::Option<::std::string::String>,
pub(crate) subnet_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) security_group_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl CreateAgentInputBuilder {
/// <p>Your agent activation key. You can get the activation key either by sending an HTTP GET request with redirects that enable you to get the agent IP address (port 80). Alternatively, you can get it from the DataSync console.</p>
/// <p>The redirect URL returned in the response provides you the activation key for your agent in the query string parameter <code>activationKey</code>. It might also include other activation-related parameters; however, these are merely defaults. The arguments you pass to this API call determine the actual configuration of your agent.</p>
/// <p>For more information, see Activating an Agent in the <i>DataSync User Guide.</i> </p>
pub fn activation_key(
mut self,
input: impl ::std::convert::Into<::std::string::String>,
) -> Self {
self.activation_key = ::std::option::Option::Some(input.into());
self
}
/// <p>Your agent activation key. You can get the activation key either by sending an HTTP GET request with redirects that enable you to get the agent IP address (port 80). Alternatively, you can get it from the DataSync console.</p>
/// <p>The redirect URL returned in the response provides you the activation key for your agent in the query string parameter <code>activationKey</code>. It might also include other activation-related parameters; however, these are merely defaults. The arguments you pass to this API call determine the actual configuration of your agent.</p>
/// <p>For more information, see Activating an Agent in the <i>DataSync User Guide.</i> </p>
pub fn set_activation_key(
mut self,
input: ::std::option::Option<::std::string::String>,
) -> Self {
self.activation_key = input;
self
}
/// <p>The name you configured for your agent. This value is a text reference that is used to identify the agent in the console.</p>
pub fn agent_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.agent_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name you configured for your agent. This value is a text reference that is used to identify the agent in the console.</p>
pub fn set_agent_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.agent_name = input;
self
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The key-value pair that represents the tag that you want to associate with the agent. The value can be an empty string. This value helps you manage, filter, and search for your agents.</p> <note>
/// <p>Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @. </p>
/// </note>
pub fn tags(mut self, input: crate::types::TagListEntry) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
/// <p>The key-value pair that represents the tag that you want to associate with the agent. The value can be an empty string. This value helps you manage, filter, and search for your agents.</p> <note>
/// <p>Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @. </p>
/// </note>
pub fn set_tags(
mut self,
input: ::std::option::Option<::std::vec::Vec<crate::types::TagListEntry>>,
) -> Self {
self.tags = input;
self
}
/// <p>The ID of the VPC (virtual private cloud) endpoint that the agent has access to. This is the client-side VPC endpoint, also called a PrivateLink. If you don't have a PrivateLink VPC endpoint, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html#create-endpoint-service">Creating a VPC Endpoint Service Configuration</a> in the Amazon VPC User Guide.</p>
/// <p>VPC endpoint ID looks like this: <code>vpce-01234d5aff67890e1</code>.</p>
pub fn vpc_endpoint_id(
mut self,
input: impl ::std::convert::Into<::std::string::String>,
) -> Self {
self.vpc_endpoint_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the VPC (virtual private cloud) endpoint that the agent has access to. This is the client-side VPC endpoint, also called a PrivateLink. If you don't have a PrivateLink VPC endpoint, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html#create-endpoint-service">Creating a VPC Endpoint Service Configuration</a> in the Amazon VPC User Guide.</p>
/// <p>VPC endpoint ID looks like this: <code>vpce-01234d5aff67890e1</code>.</p>
pub fn set_vpc_endpoint_id(
mut self,
input: ::std::option::Option<::std::string::String>,
) -> Self {
self.vpc_endpoint_id = input;
self
}
/// Appends an item to `subnet_arns`.
///
/// To override the contents of this collection use [`set_subnet_arns`](Self::set_subnet_arns).
///
/// <p>The Amazon Resource Names (ARNs) of the subnets in which DataSync will create elastic network interfaces for each data transfer task. The agent that runs a task must be private. When you start a task that is associated with an agent created in a VPC, or one that has access to an IP address in a VPC, then the task is also private. In this case, DataSync creates four network interfaces for each task in your subnet. For a data transfer to work, the agent must be able to route to all these four network interfaces.</p>
pub fn subnet_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.subnet_arns.unwrap_or_default();
v.push(input.into());
self.subnet_arns = ::std::option::Option::Some(v);
self
}
/// <p>The Amazon Resource Names (ARNs) of the subnets in which DataSync will create elastic network interfaces for each data transfer task. The agent that runs a task must be private. When you start a task that is associated with an agent created in a VPC, or one that has access to an IP address in a VPC, then the task is also private. In this case, DataSync creates four network interfaces for each task in your subnet. For a data transfer to work, the agent must be able to route to all these four network interfaces.</p>
pub fn set_subnet_arns(
mut self,
input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
) -> Self {
self.subnet_arns = input;
self
}
/// Appends an item to `security_group_arns`.
///
/// To override the contents of this collection use [`set_security_group_arns`](Self::set_security_group_arns).
///
/// <p>The ARNs of the security groups used to protect your data transfer task subnets. See <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_Ec2Config.html#DataSync-Type-Ec2Config-SecurityGroupArns">SecurityGroupArns</a>.</p>
pub fn security_group_arns(
mut self,
input: impl ::std::convert::Into<::std::string::String>,
) -> Self {
let mut v = self.security_group_arns.unwrap_or_default();
v.push(input.into());
self.security_group_arns = ::std::option::Option::Some(v);
self
}
/// <p>The ARNs of the security groups used to protect your data transfer task subnets. See <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_Ec2Config.html#DataSync-Type-Ec2Config-SecurityGroupArns">SecurityGroupArns</a>.</p>
pub fn set_security_group_arns(
mut self,
input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
) -> Self {
self.security_group_arns = input;
self
}
/// Consumes the builder and constructs a [`CreateAgentInput`](crate::operation::create_agent::CreateAgentInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::create_agent::CreateAgentInput,
::aws_smithy_http::operation::error::BuildError,
> {
::std::result::Result::Ok(crate::operation::create_agent::CreateAgentInput {
activation_key: self.activation_key,
agent_name: self.agent_name,
tags: self.tags,
vpc_endpoint_id: self.vpc_endpoint_id,
subnet_arns: self.subnet_arns,
security_group_arns: self.security_group_arns,
})
}
}