aws-sdk-lightsail 1.108.0

AWS SDK for Amazon Lightsail
Documentation
// 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 GetContainerLogInput {
    /// <p>The name of the container service for which to get a container log.</p>
    pub service_name: ::std::option::Option<::std::string::String>,
    /// <p>The name of the container that is either running or previously ran on the container service for which to return a log.</p>
    pub container_name: ::std::option::Option<::std::string::String>,
    /// <p>The start of the time interval for which to get log data.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Specified in Coordinated Universal Time (UTC).</p></li>
    /// <li>
    /// <p>Specified in the Unix time format.</p>
    /// <p>For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, specify <code>1538424000</code> as the start time.</p></li>
    /// </ul>
    /// <p>You can convert a human-friendly time to Unix time format using a converter like <a href="https://www.epochconverter.com/">Epoch converter</a>.</p>
    pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The end of the time interval for which to get log data.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Specified in Coordinated Universal Time (UTC).</p></li>
    /// <li>
    /// <p>Specified in the Unix time format.</p>
    /// <p>For example, if you wish to use an end time of October 1, 2018, at 9 PM UTC, specify <code>1538427600</code> as the end time.</p></li>
    /// </ul>
    /// <p>You can convert a human-friendly time to Unix time format using a converter like <a href="https://www.epochconverter.com/">Epoch converter</a>.</p>
    pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The pattern to use to filter the returned log events to a specific term.</p>
    /// <p>The following are a few examples of filter patterns that you can specify:</p>
    /// <ul>
    /// <li>
    /// <p>To return all log events, specify a filter pattern of <code>""</code>.</p></li>
    /// <li>
    /// <p>To exclude log events that contain the <code>ERROR</code> term, and return all other log events, specify a filter pattern of <code>"-ERROR"</code>.</p></li>
    /// <li>
    /// <p>To return log events that contain the <code>ERROR</code> term, specify a filter pattern of <code>"ERROR"</code>.</p></li>
    /// <li>
    /// <p>To return log events that contain both the <code>ERROR</code> and <code>Exception</code> terms, specify a filter pattern of <code>"ERROR Exception"</code>.</p></li>
    /// <li>
    /// <p>To return log events that contain the <code>ERROR</code> <i>or</i> the <code>Exception</code> term, specify a filter pattern of <code>"?ERROR ?Exception"</code>.</p></li>
    /// </ul>
    pub filter_pattern: ::std::option::Option<::std::string::String>,
    /// <p>The token to advance to the next page of results from your request.</p>
    /// <p>To get a page token, perform an initial <code>GetContainerLog</code> request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.</p>
    pub page_token: ::std::option::Option<::std::string::String>,
}
impl GetContainerLogInput {
    /// <p>The name of the container service for which to get a container log.</p>
    pub fn service_name(&self) -> ::std::option::Option<&str> {
        self.service_name.as_deref()
    }
    /// <p>The name of the container that is either running or previously ran on the container service for which to return a log.</p>
    pub fn container_name(&self) -> ::std::option::Option<&str> {
        self.container_name.as_deref()
    }
    /// <p>The start of the time interval for which to get log data.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Specified in Coordinated Universal Time (UTC).</p></li>
    /// <li>
    /// <p>Specified in the Unix time format.</p>
    /// <p>For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, specify <code>1538424000</code> as the start time.</p></li>
    /// </ul>
    /// <p>You can convert a human-friendly time to Unix time format using a converter like <a href="https://www.epochconverter.com/">Epoch converter</a>.</p>
    pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.start_time.as_ref()
    }
    /// <p>The end of the time interval for which to get log data.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Specified in Coordinated Universal Time (UTC).</p></li>
    /// <li>
    /// <p>Specified in the Unix time format.</p>
    /// <p>For example, if you wish to use an end time of October 1, 2018, at 9 PM UTC, specify <code>1538427600</code> as the end time.</p></li>
    /// </ul>
    /// <p>You can convert a human-friendly time to Unix time format using a converter like <a href="https://www.epochconverter.com/">Epoch converter</a>.</p>
    pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.end_time.as_ref()
    }
    /// <p>The pattern to use to filter the returned log events to a specific term.</p>
    /// <p>The following are a few examples of filter patterns that you can specify:</p>
    /// <ul>
    /// <li>
    /// <p>To return all log events, specify a filter pattern of <code>""</code>.</p></li>
    /// <li>
    /// <p>To exclude log events that contain the <code>ERROR</code> term, and return all other log events, specify a filter pattern of <code>"-ERROR"</code>.</p></li>
    /// <li>
    /// <p>To return log events that contain the <code>ERROR</code> term, specify a filter pattern of <code>"ERROR"</code>.</p></li>
    /// <li>
    /// <p>To return log events that contain both the <code>ERROR</code> and <code>Exception</code> terms, specify a filter pattern of <code>"ERROR Exception"</code>.</p></li>
    /// <li>
    /// <p>To return log events that contain the <code>ERROR</code> <i>or</i> the <code>Exception</code> term, specify a filter pattern of <code>"?ERROR ?Exception"</code>.</p></li>
    /// </ul>
    pub fn filter_pattern(&self) -> ::std::option::Option<&str> {
        self.filter_pattern.as_deref()
    }
    /// <p>The token to advance to the next page of results from your request.</p>
    /// <p>To get a page token, perform an initial <code>GetContainerLog</code> request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.</p>
    pub fn page_token(&self) -> ::std::option::Option<&str> {
        self.page_token.as_deref()
    }
}
impl GetContainerLogInput {
    /// Creates a new builder-style object to manufacture [`GetContainerLogInput`](crate::operation::get_container_log::GetContainerLogInput).
    pub fn builder() -> crate::operation::get_container_log::builders::GetContainerLogInputBuilder {
        crate::operation::get_container_log::builders::GetContainerLogInputBuilder::default()
    }
}

/// A builder for [`GetContainerLogInput`](crate::operation::get_container_log::GetContainerLogInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetContainerLogInputBuilder {
    pub(crate) service_name: ::std::option::Option<::std::string::String>,
    pub(crate) container_name: ::std::option::Option<::std::string::String>,
    pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) filter_pattern: ::std::option::Option<::std::string::String>,
    pub(crate) page_token: ::std::option::Option<::std::string::String>,
}
impl GetContainerLogInputBuilder {
    /// <p>The name of the container service for which to get a container log.</p>
    /// This field is required.
    pub fn service_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.service_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the container service for which to get a container log.</p>
    pub fn set_service_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.service_name = input;
        self
    }
    /// <p>The name of the container service for which to get a container log.</p>
    pub fn get_service_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_name
    }
    /// <p>The name of the container that is either running or previously ran on the container service for which to return a log.</p>
    /// This field is required.
    pub fn container_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.container_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the container that is either running or previously ran on the container service for which to return a log.</p>
    pub fn set_container_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.container_name = input;
        self
    }
    /// <p>The name of the container that is either running or previously ran on the container service for which to return a log.</p>
    pub fn get_container_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.container_name
    }
    /// <p>The start of the time interval for which to get log data.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Specified in Coordinated Universal Time (UTC).</p></li>
    /// <li>
    /// <p>Specified in the Unix time format.</p>
    /// <p>For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, specify <code>1538424000</code> as the start time.</p></li>
    /// </ul>
    /// <p>You can convert a human-friendly time to Unix time format using a converter like <a href="https://www.epochconverter.com/">Epoch converter</a>.</p>
    pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.start_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The start of the time interval for which to get log data.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Specified in Coordinated Universal Time (UTC).</p></li>
    /// <li>
    /// <p>Specified in the Unix time format.</p>
    /// <p>For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, specify <code>1538424000</code> as the start time.</p></li>
    /// </ul>
    /// <p>You can convert a human-friendly time to Unix time format using a converter like <a href="https://www.epochconverter.com/">Epoch converter</a>.</p>
    pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.start_time = input;
        self
    }
    /// <p>The start of the time interval for which to get log data.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Specified in Coordinated Universal Time (UTC).</p></li>
    /// <li>
    /// <p>Specified in the Unix time format.</p>
    /// <p>For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, specify <code>1538424000</code> as the start time.</p></li>
    /// </ul>
    /// <p>You can convert a human-friendly time to Unix time format using a converter like <a href="https://www.epochconverter.com/">Epoch converter</a>.</p>
    pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.start_time
    }
    /// <p>The end of the time interval for which to get log data.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Specified in Coordinated Universal Time (UTC).</p></li>
    /// <li>
    /// <p>Specified in the Unix time format.</p>
    /// <p>For example, if you wish to use an end time of October 1, 2018, at 9 PM UTC, specify <code>1538427600</code> as the end time.</p></li>
    /// </ul>
    /// <p>You can convert a human-friendly time to Unix time format using a converter like <a href="https://www.epochconverter.com/">Epoch converter</a>.</p>
    pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.end_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The end of the time interval for which to get log data.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Specified in Coordinated Universal Time (UTC).</p></li>
    /// <li>
    /// <p>Specified in the Unix time format.</p>
    /// <p>For example, if you wish to use an end time of October 1, 2018, at 9 PM UTC, specify <code>1538427600</code> as the end time.</p></li>
    /// </ul>
    /// <p>You can convert a human-friendly time to Unix time format using a converter like <a href="https://www.epochconverter.com/">Epoch converter</a>.</p>
    pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.end_time = input;
        self
    }
    /// <p>The end of the time interval for which to get log data.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Specified in Coordinated Universal Time (UTC).</p></li>
    /// <li>
    /// <p>Specified in the Unix time format.</p>
    /// <p>For example, if you wish to use an end time of October 1, 2018, at 9 PM UTC, specify <code>1538427600</code> as the end time.</p></li>
    /// </ul>
    /// <p>You can convert a human-friendly time to Unix time format using a converter like <a href="https://www.epochconverter.com/">Epoch converter</a>.</p>
    pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.end_time
    }
    /// <p>The pattern to use to filter the returned log events to a specific term.</p>
    /// <p>The following are a few examples of filter patterns that you can specify:</p>
    /// <ul>
    /// <li>
    /// <p>To return all log events, specify a filter pattern of <code>""</code>.</p></li>
    /// <li>
    /// <p>To exclude log events that contain the <code>ERROR</code> term, and return all other log events, specify a filter pattern of <code>"-ERROR"</code>.</p></li>
    /// <li>
    /// <p>To return log events that contain the <code>ERROR</code> term, specify a filter pattern of <code>"ERROR"</code>.</p></li>
    /// <li>
    /// <p>To return log events that contain both the <code>ERROR</code> and <code>Exception</code> terms, specify a filter pattern of <code>"ERROR Exception"</code>.</p></li>
    /// <li>
    /// <p>To return log events that contain the <code>ERROR</code> <i>or</i> the <code>Exception</code> term, specify a filter pattern of <code>"?ERROR ?Exception"</code>.</p></li>
    /// </ul>
    pub fn filter_pattern(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.filter_pattern = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The pattern to use to filter the returned log events to a specific term.</p>
    /// <p>The following are a few examples of filter patterns that you can specify:</p>
    /// <ul>
    /// <li>
    /// <p>To return all log events, specify a filter pattern of <code>""</code>.</p></li>
    /// <li>
    /// <p>To exclude log events that contain the <code>ERROR</code> term, and return all other log events, specify a filter pattern of <code>"-ERROR"</code>.</p></li>
    /// <li>
    /// <p>To return log events that contain the <code>ERROR</code> term, specify a filter pattern of <code>"ERROR"</code>.</p></li>
    /// <li>
    /// <p>To return log events that contain both the <code>ERROR</code> and <code>Exception</code> terms, specify a filter pattern of <code>"ERROR Exception"</code>.</p></li>
    /// <li>
    /// <p>To return log events that contain the <code>ERROR</code> <i>or</i> the <code>Exception</code> term, specify a filter pattern of <code>"?ERROR ?Exception"</code>.</p></li>
    /// </ul>
    pub fn set_filter_pattern(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.filter_pattern = input;
        self
    }
    /// <p>The pattern to use to filter the returned log events to a specific term.</p>
    /// <p>The following are a few examples of filter patterns that you can specify:</p>
    /// <ul>
    /// <li>
    /// <p>To return all log events, specify a filter pattern of <code>""</code>.</p></li>
    /// <li>
    /// <p>To exclude log events that contain the <code>ERROR</code> term, and return all other log events, specify a filter pattern of <code>"-ERROR"</code>.</p></li>
    /// <li>
    /// <p>To return log events that contain the <code>ERROR</code> term, specify a filter pattern of <code>"ERROR"</code>.</p></li>
    /// <li>
    /// <p>To return log events that contain both the <code>ERROR</code> and <code>Exception</code> terms, specify a filter pattern of <code>"ERROR Exception"</code>.</p></li>
    /// <li>
    /// <p>To return log events that contain the <code>ERROR</code> <i>or</i> the <code>Exception</code> term, specify a filter pattern of <code>"?ERROR ?Exception"</code>.</p></li>
    /// </ul>
    pub fn get_filter_pattern(&self) -> &::std::option::Option<::std::string::String> {
        &self.filter_pattern
    }
    /// <p>The token to advance to the next page of results from your request.</p>
    /// <p>To get a page token, perform an initial <code>GetContainerLog</code> request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.</p>
    pub fn page_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.page_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The token to advance to the next page of results from your request.</p>
    /// <p>To get a page token, perform an initial <code>GetContainerLog</code> request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.</p>
    pub fn set_page_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.page_token = input;
        self
    }
    /// <p>The token to advance to the next page of results from your request.</p>
    /// <p>To get a page token, perform an initial <code>GetContainerLog</code> request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.</p>
    pub fn get_page_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.page_token
    }
    /// Consumes the builder and constructs a [`GetContainerLogInput`](crate::operation::get_container_log::GetContainerLogInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_container_log::GetContainerLogInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_container_log::GetContainerLogInput {
            service_name: self.service_name,
            container_name: self.container_name,
            start_time: self.start_time,
            end_time: self.end_time,
            filter_pattern: self.filter_pattern,
            page_token: self.page_token,
        })
    }
}