1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateService`](crate::operation::create_service::builders::CreateServiceFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`name(impl Into<String>)`](crate::operation::create_service::builders::CreateServiceFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_service::builders::CreateServiceFluentBuilder::set_name):<br>required: **true**<br><p>The name that you want to assign to the service.</p><note>  <p>Do not include sensitive information in the name if the namespace is discoverable by public DNS queries.</p> </note> <p>If you want Cloud Map to create an <code>SRV</code> record when you register an instance and you're using a system that requires a specific <code>SRV</code> format, such as <a href="http://www.haproxy.org/">HAProxy</a>, specify the following for <code>Name</code>:</p> <ul>  <li>   <p>Start the name with an underscore (_), such as <code>_exampleservice</code>.</p></li>  <li>   <p>End the name with <i>._protocol</i>, such as <code>._tcp</code>.</p></li> </ul> <p>When you register an instance, Cloud Map creates an <code>SRV</code> record and assigns a name to the record by concatenating the service name and the namespace name (for example,</p> <p><code>_exampleservice._tcp.example.com</code>).</p><note>  <p>For services that are accessible by DNS queries, you can't create multiple services with names that differ only by case (such as EXAMPLE and example). Otherwise, these services have the same DNS name and can't be distinguished. However, if you use a namespace that's only accessible by API calls, then you can create services that with names that differ only by case.</p> </note><br>
    ///   - [`namespace_id(impl Into<String>)`](crate::operation::create_service::builders::CreateServiceFluentBuilder::namespace_id) / [`set_namespace_id(Option<String>)`](crate::operation::create_service::builders::CreateServiceFluentBuilder::set_namespace_id):<br>required: **false**<br><p>The ID of the namespace that you want to use to create the service. The namespace ID must be specified, but it can be specified either here or in the <code>DnsConfig</code> object.</p><br>
    ///   - [`creator_request_id(impl Into<String>)`](crate::operation::create_service::builders::CreateServiceFluentBuilder::creator_request_id) / [`set_creator_request_id(Option<String>)`](crate::operation::create_service::builders::CreateServiceFluentBuilder::set_creator_request_id):<br>required: **false**<br><p>A unique string that identifies the request and that allows failed <code>CreateService</code> requests to be retried without the risk of running the operation twice. <code>CreatorRequestId</code> can be any unique string (for example, a date/timestamp).</p><br>
    ///   - [`description(impl Into<String>)`](crate::operation::create_service::builders::CreateServiceFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_service::builders::CreateServiceFluentBuilder::set_description):<br>required: **false**<br><p>A description for the service.</p><br>
    ///   - [`dns_config(DnsConfig)`](crate::operation::create_service::builders::CreateServiceFluentBuilder::dns_config) / [`set_dns_config(Option<DnsConfig>)`](crate::operation::create_service::builders::CreateServiceFluentBuilder::set_dns_config):<br>required: **false**<br><p>A complex type that contains information about the Amazon Route&nbsp;53 records that you want Cloud Map to create when you register an instance.</p><br>
    ///   - [`health_check_config(HealthCheckConfig)`](crate::operation::create_service::builders::CreateServiceFluentBuilder::health_check_config) / [`set_health_check_config(Option<HealthCheckConfig>)`](crate::operation::create_service::builders::CreateServiceFluentBuilder::set_health_check_config):<br>required: **false**<br><p><i>Public DNS and HTTP namespaces only.</i> A complex type that contains settings for an optional Route&nbsp;53 health check. If you specify settings for a health check, Cloud Map associates the health check with all the Route&nbsp;53 DNS records that you specify in <code>DnsConfig</code>.</p><important>  <p>If you specify a health check configuration, you can specify either <code>HealthCheckCustomConfig</code> or <code>HealthCheckConfig</code> but not both.</p> </important> <p>For information about the charges for health checks, see <a href="http://aws.amazon.com/cloud-map/pricing/">Cloud Map Pricing</a>.</p><br>
    ///   - [`health_check_custom_config(HealthCheckCustomConfig)`](crate::operation::create_service::builders::CreateServiceFluentBuilder::health_check_custom_config) / [`set_health_check_custom_config(Option<HealthCheckCustomConfig>)`](crate::operation::create_service::builders::CreateServiceFluentBuilder::set_health_check_custom_config):<br>required: **false**<br><p>A complex type that contains information about an optional custom health check.</p><important>  <p>If you specify a health check configuration, you can specify either <code>HealthCheckCustomConfig</code> or <code>HealthCheckConfig</code> but not both.</p> </important> <p>You can't add, update, or delete a <code>HealthCheckCustomConfig</code> configuration from an existing service.</p><br>
    ///   - [`tags(Tag)`](crate::operation::create_service::builders::CreateServiceFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_service::builders::CreateServiceFluentBuilder::set_tags):<br>required: **false**<br><p>The tags to add to the service. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.</p><br>
    ///   - [`r#type(ServiceTypeOption)`](crate::operation::create_service::builders::CreateServiceFluentBuilder::type) / [`set_type(Option<ServiceTypeOption>)`](crate::operation::create_service::builders::CreateServiceFluentBuilder::set_type):<br>required: **false**<br><p>If present, specifies that the service instances are only discoverable using the <code>DiscoverInstances</code> API operation. No DNS records is registered for the service instances. The only valid value is <code>HTTP</code>.</p><br>
    /// - On success, responds with [`CreateServiceOutput`](crate::operation::create_service::CreateServiceOutput) with field(s):
    ///   - [`service(Option<Service>)`](crate::operation::create_service::CreateServiceOutput::service): <p>A complex type that contains information about the new service.</p>
    /// - On failure, responds with [`SdkError<CreateServiceError>`](crate::operation::create_service::CreateServiceError)
    pub fn create_service(&self) -> crate::operation::create_service::builders::CreateServiceFluentBuilder {
        crate::operation::create_service::builders::CreateServiceFluentBuilder::new(self.handle.clone())
    }
}