aws_sdk_datasync/client/
create_agent.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateAgent`](crate::operation::create_agent::builders::CreateAgentFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`activation_key(impl Into<String>)`](crate::operation::create_agent::builders::CreateAgentFluentBuilder::activation_key) / [`set_activation_key(Option<String>)`](crate::operation::create_agent::builders::CreateAgentFluentBuilder::set_activation_key):<br>required: **true**<br><p>Specifies your DataSync agent's activation key. If you don't have an activation key, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/activate-agent.html">Activating your agent</a>.</p><br>
    ///   - [`agent_name(impl Into<String>)`](crate::operation::create_agent::builders::CreateAgentFluentBuilder::agent_name) / [`set_agent_name(Option<String>)`](crate::operation::create_agent::builders::CreateAgentFluentBuilder::set_agent_name):<br>required: **false**<br><p>Specifies a name for your agent. We recommend specifying a name that you can remember.</p><br>
    ///   - [`tags(TagListEntry)`](crate::operation::create_agent::builders::CreateAgentFluentBuilder::tags) / [`set_tags(Option<Vec::<TagListEntry>>)`](crate::operation::create_agent::builders::CreateAgentFluentBuilder::set_tags):<br>required: **false**<br><p>Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least one tag for your agent.</p><br>
    ///   - [`vpc_endpoint_id(impl Into<String>)`](crate::operation::create_agent::builders::CreateAgentFluentBuilder::vpc_endpoint_id) / [`set_vpc_endpoint_id(Option<String>)`](crate::operation::create_agent::builders::CreateAgentFluentBuilder::set_vpc_endpoint_id):<br>required: **false**<br><p>Specifies the ID of the <a href="https://docs.aws.amazon.com/datasync/latest/userguide/choose-service-endpoint.html#datasync-in-vpc">VPC service endpoint</a> that you're using. For example, a VPC endpoint ID looks like <code>vpce-01234d5aff67890e1</code>.</p><important>  <p>The VPC service endpoint you use must include the DataSync service name (for example, <code>com.amazonaws.us-east-2.datasync</code>).</p> </important><br>
    ///   - [`subnet_arns(impl Into<String>)`](crate::operation::create_agent::builders::CreateAgentFluentBuilder::subnet_arns) / [`set_subnet_arns(Option<Vec::<String>>)`](crate::operation::create_agent::builders::CreateAgentFluentBuilder::set_subnet_arns):<br>required: **false**<br><p>Specifies the ARN of the subnet where your VPC service endpoint is located. You can only specify one ARN.</p><br>
    ///   - [`security_group_arns(impl Into<String>)`](crate::operation::create_agent::builders::CreateAgentFluentBuilder::security_group_arns) / [`set_security_group_arns(Option<Vec::<String>>)`](crate::operation::create_agent::builders::CreateAgentFluentBuilder::set_security_group_arns):<br>required: **false**<br><p>Specifies the Amazon Resource Name (ARN) of the security group that allows traffic between your agent and VPC service endpoint. You can only specify one ARN.</p><br>
    /// - On success, responds with [`CreateAgentOutput`](crate::operation::create_agent::CreateAgentOutput) with field(s):
    ///   - [`agent_arn(Option<String>)`](crate::operation::create_agent::CreateAgentOutput::agent_arn): <p>The ARN of the agent that you just activated. Use the <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_ListAgents.html">ListAgents</a> operation to return a list of agents in your Amazon Web Services account and Amazon Web Services Region.</p>
    /// - On failure, responds with [`SdkError<CreateAgentError>`](crate::operation::create_agent::CreateAgentError)
    pub fn create_agent(&self) -> crate::operation::create_agent::builders::CreateAgentFluentBuilder {
        crate::operation::create_agent::builders::CreateAgentFluentBuilder::new(self.handle.clone())
    }
}