aws-sdk-route53 1.56.0

AWS SDK for Amazon Route 53
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A complex type that contains the health check request information.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateHealthCheckInput {
    /// <p>A unique string that identifies the request and that allows you to retry a failed <code>CreateHealthCheck</code> request without the risk of creating two identical health checks:</p>
    /// <ul>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with the same <code>CallerReference</code> and settings as a previous request, and if the health check doesn't exist, Amazon Route 53 creates the health check. If the health check does exist, Route 53 returns the settings for the existing health check.</p></li>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with the same <code>CallerReference</code> as a deleted health check, regardless of the settings, Route 53 returns a <code>HealthCheckAlreadyExists</code> error.</p></li>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with the same <code>CallerReference</code> as an existing health check but with different settings, Route 53 returns a <code>HealthCheckAlreadyExists</code> error.</p></li>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with a unique <code>CallerReference</code> but settings identical to an existing health check, Route 53 creates the health check.</p></li>
    /// </ul>
    /// <p>Route 53 does not store the <code>CallerReference</code> for a deleted health check indefinitely. The <code>CallerReference</code> for a deleted health check will be deleted after a number of days.</p>
    pub caller_reference: ::std::option::Option<::std::string::String>,
    /// <p>A complex type that contains settings for a new health check.</p>
    pub health_check_config: ::std::option::Option<crate::types::HealthCheckConfig>,
}
impl CreateHealthCheckInput {
    /// <p>A unique string that identifies the request and that allows you to retry a failed <code>CreateHealthCheck</code> request without the risk of creating two identical health checks:</p>
    /// <ul>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with the same <code>CallerReference</code> and settings as a previous request, and if the health check doesn't exist, Amazon Route 53 creates the health check. If the health check does exist, Route 53 returns the settings for the existing health check.</p></li>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with the same <code>CallerReference</code> as a deleted health check, regardless of the settings, Route 53 returns a <code>HealthCheckAlreadyExists</code> error.</p></li>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with the same <code>CallerReference</code> as an existing health check but with different settings, Route 53 returns a <code>HealthCheckAlreadyExists</code> error.</p></li>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with a unique <code>CallerReference</code> but settings identical to an existing health check, Route 53 creates the health check.</p></li>
    /// </ul>
    /// <p>Route 53 does not store the <code>CallerReference</code> for a deleted health check indefinitely. The <code>CallerReference</code> for a deleted health check will be deleted after a number of days.</p>
    pub fn caller_reference(&self) -> ::std::option::Option<&str> {
        self.caller_reference.as_deref()
    }
    /// <p>A complex type that contains settings for a new health check.</p>
    pub fn health_check_config(&self) -> ::std::option::Option<&crate::types::HealthCheckConfig> {
        self.health_check_config.as_ref()
    }
}
impl CreateHealthCheckInput {
    /// Creates a new builder-style object to manufacture [`CreateHealthCheckInput`](crate::operation::create_health_check::CreateHealthCheckInput).
    pub fn builder() -> crate::operation::create_health_check::builders::CreateHealthCheckInputBuilder {
        crate::operation::create_health_check::builders::CreateHealthCheckInputBuilder::default()
    }
}

/// A builder for [`CreateHealthCheckInput`](crate::operation::create_health_check::CreateHealthCheckInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateHealthCheckInputBuilder {
    pub(crate) caller_reference: ::std::option::Option<::std::string::String>,
    pub(crate) health_check_config: ::std::option::Option<crate::types::HealthCheckConfig>,
}
impl CreateHealthCheckInputBuilder {
    /// <p>A unique string that identifies the request and that allows you to retry a failed <code>CreateHealthCheck</code> request without the risk of creating two identical health checks:</p>
    /// <ul>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with the same <code>CallerReference</code> and settings as a previous request, and if the health check doesn't exist, Amazon Route 53 creates the health check. If the health check does exist, Route 53 returns the settings for the existing health check.</p></li>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with the same <code>CallerReference</code> as a deleted health check, regardless of the settings, Route 53 returns a <code>HealthCheckAlreadyExists</code> error.</p></li>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with the same <code>CallerReference</code> as an existing health check but with different settings, Route 53 returns a <code>HealthCheckAlreadyExists</code> error.</p></li>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with a unique <code>CallerReference</code> but settings identical to an existing health check, Route 53 creates the health check.</p></li>
    /// </ul>
    /// <p>Route 53 does not store the <code>CallerReference</code> for a deleted health check indefinitely. The <code>CallerReference</code> for a deleted health check will be deleted after a number of days.</p>
    /// This field is required.
    pub fn caller_reference(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.caller_reference = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique string that identifies the request and that allows you to retry a failed <code>CreateHealthCheck</code> request without the risk of creating two identical health checks:</p>
    /// <ul>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with the same <code>CallerReference</code> and settings as a previous request, and if the health check doesn't exist, Amazon Route 53 creates the health check. If the health check does exist, Route 53 returns the settings for the existing health check.</p></li>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with the same <code>CallerReference</code> as a deleted health check, regardless of the settings, Route 53 returns a <code>HealthCheckAlreadyExists</code> error.</p></li>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with the same <code>CallerReference</code> as an existing health check but with different settings, Route 53 returns a <code>HealthCheckAlreadyExists</code> error.</p></li>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with a unique <code>CallerReference</code> but settings identical to an existing health check, Route 53 creates the health check.</p></li>
    /// </ul>
    /// <p>Route 53 does not store the <code>CallerReference</code> for a deleted health check indefinitely. The <code>CallerReference</code> for a deleted health check will be deleted after a number of days.</p>
    pub fn set_caller_reference(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.caller_reference = input;
        self
    }
    /// <p>A unique string that identifies the request and that allows you to retry a failed <code>CreateHealthCheck</code> request without the risk of creating two identical health checks:</p>
    /// <ul>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with the same <code>CallerReference</code> and settings as a previous request, and if the health check doesn't exist, Amazon Route 53 creates the health check. If the health check does exist, Route 53 returns the settings for the existing health check.</p></li>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with the same <code>CallerReference</code> as a deleted health check, regardless of the settings, Route 53 returns a <code>HealthCheckAlreadyExists</code> error.</p></li>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with the same <code>CallerReference</code> as an existing health check but with different settings, Route 53 returns a <code>HealthCheckAlreadyExists</code> error.</p></li>
    /// <li>
    /// <p>If you send a <code>CreateHealthCheck</code> request with a unique <code>CallerReference</code> but settings identical to an existing health check, Route 53 creates the health check.</p></li>
    /// </ul>
    /// <p>Route 53 does not store the <code>CallerReference</code> for a deleted health check indefinitely. The <code>CallerReference</code> for a deleted health check will be deleted after a number of days.</p>
    pub fn get_caller_reference(&self) -> &::std::option::Option<::std::string::String> {
        &self.caller_reference
    }
    /// <p>A complex type that contains settings for a new health check.</p>
    /// This field is required.
    pub fn health_check_config(mut self, input: crate::types::HealthCheckConfig) -> Self {
        self.health_check_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>A complex type that contains settings for a new health check.</p>
    pub fn set_health_check_config(mut self, input: ::std::option::Option<crate::types::HealthCheckConfig>) -> Self {
        self.health_check_config = input;
        self
    }
    /// <p>A complex type that contains settings for a new health check.</p>
    pub fn get_health_check_config(&self) -> &::std::option::Option<crate::types::HealthCheckConfig> {
        &self.health_check_config
    }
    /// Consumes the builder and constructs a [`CreateHealthCheckInput`](crate::operation::create_health_check::CreateHealthCheckInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_health_check::CreateHealthCheckInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_health_check::CreateHealthCheckInput {
            caller_reference: self.caller_reference,
            health_check_config: self.health_check_config,
        })
    }
}