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 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Describes an App Runner VPC connector resource. A VPC connector describes the Amazon Virtual Private Cloud (Amazon VPC) that an App Runner service is associated with, and the subnets and security group that are used.</p>
/// <p>Multiple revisions of a connector might have the same <code>Name</code> and different <code>Revision</code> values.</p> <note>
/// <p>At this time, App Runner supports only one revision per name.</p>
/// </note>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct VpcConnector {
/// <p>The customer-provided VPC connector name.</p>
pub vpc_connector_name: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Name (ARN) of this VPC connector.</p>
pub vpc_connector_arn: ::std::option::Option<::std::string::String>,
/// <p>The revision of this VPC connector. It's unique among all the active connectors (<code>"Status": "ACTIVE"</code>) that share the same <code>Name</code>.</p> <note>
/// <p>At this time, App Runner supports only one revision per name.</p>
/// </note>
pub vpc_connector_revision: i32,
/// <p>A list of IDs of subnets that App Runner uses for your service. All IDs are of subnets of a single Amazon VPC.</p>
pub subnets: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>A list of IDs of security groups that App Runner uses for access to Amazon Web Services resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.</p>
pub security_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>The current state of the VPC connector. If the status of a connector revision is <code>INACTIVE</code>, it was deleted and can't be used. Inactive connector revisions are permanently removed some time after they are deleted.</p>
pub status: ::std::option::Option<crate::types::VpcConnectorStatus>,
/// <p>The time when the VPC connector was created. It's in Unix time stamp format.</p>
pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The time when the VPC connector was deleted. It's in Unix time stamp format.</p>
pub deleted_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl VpcConnector {
/// <p>The customer-provided VPC connector name.</p>
pub fn vpc_connector_name(&self) -> ::std::option::Option<&str> {
self.vpc_connector_name.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of this VPC connector.</p>
pub fn vpc_connector_arn(&self) -> ::std::option::Option<&str> {
self.vpc_connector_arn.as_deref()
}
/// <p>The revision of this VPC connector. It's unique among all the active connectors (<code>"Status": "ACTIVE"</code>) that share the same <code>Name</code>.</p> <note>
/// <p>At this time, App Runner supports only one revision per name.</p>
/// </note>
pub fn vpc_connector_revision(&self) -> i32 {
self.vpc_connector_revision
}
/// <p>A list of IDs of subnets that App Runner uses for your service. All IDs are of subnets of a single Amazon VPC.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.subnets.is_none()`.
pub fn subnets(&self) -> &[::std::string::String] {
self.subnets.as_deref().unwrap_or_default()
}
/// <p>A list of IDs of security groups that App Runner uses for access to Amazon Web Services resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.security_groups.is_none()`.
pub fn security_groups(&self) -> &[::std::string::String] {
self.security_groups.as_deref().unwrap_or_default()
}
/// <p>The current state of the VPC connector. If the status of a connector revision is <code>INACTIVE</code>, it was deleted and can't be used. Inactive connector revisions are permanently removed some time after they are deleted.</p>
pub fn status(&self) -> ::std::option::Option<&crate::types::VpcConnectorStatus> {
self.status.as_ref()
}
/// <p>The time when the VPC connector was created. It's in Unix time stamp format.</p>
pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
/// <p>The time when the VPC connector was deleted. It's in Unix time stamp format.</p>
pub fn deleted_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.deleted_at.as_ref()
}
}
impl VpcConnector {
/// Creates a new builder-style object to manufacture [`VpcConnector`](crate::types::VpcConnector).
pub fn builder() -> crate::types::builders::VpcConnectorBuilder {
crate::types::builders::VpcConnectorBuilder::default()
}
}
/// A builder for [`VpcConnector`](crate::types::VpcConnector).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct VpcConnectorBuilder {
pub(crate) vpc_connector_name: ::std::option::Option<::std::string::String>,
pub(crate) vpc_connector_arn: ::std::option::Option<::std::string::String>,
pub(crate) vpc_connector_revision: ::std::option::Option<i32>,
pub(crate) subnets: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) security_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) status: ::std::option::Option<crate::types::VpcConnectorStatus>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) deleted_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl VpcConnectorBuilder {
/// <p>The customer-provided VPC connector name.</p>
pub fn vpc_connector_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.vpc_connector_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The customer-provided VPC connector name.</p>
pub fn set_vpc_connector_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.vpc_connector_name = input;
self
}
/// <p>The customer-provided VPC connector name.</p>
pub fn get_vpc_connector_name(&self) -> &::std::option::Option<::std::string::String> {
&self.vpc_connector_name
}
/// <p>The Amazon Resource Name (ARN) of this VPC connector.</p>
pub fn vpc_connector_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.vpc_connector_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of this VPC connector.</p>
pub fn set_vpc_connector_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.vpc_connector_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of this VPC connector.</p>
pub fn get_vpc_connector_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.vpc_connector_arn
}
/// <p>The revision of this VPC connector. It's unique among all the active connectors (<code>"Status": "ACTIVE"</code>) that share the same <code>Name</code>.</p> <note>
/// <p>At this time, App Runner supports only one revision per name.</p>
/// </note>
pub fn vpc_connector_revision(mut self, input: i32) -> Self {
self.vpc_connector_revision = ::std::option::Option::Some(input);
self
}
/// <p>The revision of this VPC connector. It's unique among all the active connectors (<code>"Status": "ACTIVE"</code>) that share the same <code>Name</code>.</p> <note>
/// <p>At this time, App Runner supports only one revision per name.</p>
/// </note>
pub fn set_vpc_connector_revision(mut self, input: ::std::option::Option<i32>) -> Self {
self.vpc_connector_revision = input;
self
}
/// <p>The revision of this VPC connector. It's unique among all the active connectors (<code>"Status": "ACTIVE"</code>) that share the same <code>Name</code>.</p> <note>
/// <p>At this time, App Runner supports only one revision per name.</p>
/// </note>
pub fn get_vpc_connector_revision(&self) -> &::std::option::Option<i32> {
&self.vpc_connector_revision
}
/// Appends an item to `subnets`.
///
/// To override the contents of this collection use [`set_subnets`](Self::set_subnets).
///
/// <p>A list of IDs of subnets that App Runner uses for your service. All IDs are of subnets of a single Amazon VPC.</p>
pub fn subnets(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.subnets.unwrap_or_default();
v.push(input.into());
self.subnets = ::std::option::Option::Some(v);
self
}
/// <p>A list of IDs of subnets that App Runner uses for your service. All IDs are of subnets of a single Amazon VPC.</p>
pub fn set_subnets(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.subnets = input;
self
}
/// <p>A list of IDs of subnets that App Runner uses for your service. All IDs are of subnets of a single Amazon VPC.</p>
pub fn get_subnets(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.subnets
}
/// Appends an item to `security_groups`.
///
/// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
///
/// <p>A list of IDs of security groups that App Runner uses for access to Amazon Web Services resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.</p>
pub fn security_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.security_groups.unwrap_or_default();
v.push(input.into());
self.security_groups = ::std::option::Option::Some(v);
self
}
/// <p>A list of IDs of security groups that App Runner uses for access to Amazon Web Services resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.</p>
pub fn set_security_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.security_groups = input;
self
}
/// <p>A list of IDs of security groups that App Runner uses for access to Amazon Web Services resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.</p>
pub fn get_security_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.security_groups
}
/// <p>The current state of the VPC connector. If the status of a connector revision is <code>INACTIVE</code>, it was deleted and can't be used. Inactive connector revisions are permanently removed some time after they are deleted.</p>
pub fn status(mut self, input: crate::types::VpcConnectorStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
/// <p>The current state of the VPC connector. If the status of a connector revision is <code>INACTIVE</code>, it was deleted and can't be used. Inactive connector revisions are permanently removed some time after they are deleted.</p>
pub fn set_status(mut self, input: ::std::option::Option<crate::types::VpcConnectorStatus>) -> Self {
self.status = input;
self
}
/// <p>The current state of the VPC connector. If the status of a connector revision is <code>INACTIVE</code>, it was deleted and can't be used. Inactive connector revisions are permanently removed some time after they are deleted.</p>
pub fn get_status(&self) -> &::std::option::Option<crate::types::VpcConnectorStatus> {
&self.status
}
/// <p>The time when the VPC connector was created. It's in Unix time stamp format.</p>
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
/// <p>The time when the VPC connector was created. It's in Unix time stamp format.</p>
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
/// <p>The time when the VPC connector was created. It's in Unix time stamp format.</p>
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
/// <p>The time when the VPC connector was deleted. It's in Unix time stamp format.</p>
pub fn deleted_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.deleted_at = ::std::option::Option::Some(input);
self
}
/// <p>The time when the VPC connector was deleted. It's in Unix time stamp format.</p>
pub fn set_deleted_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.deleted_at = input;
self
}
/// <p>The time when the VPC connector was deleted. It's in Unix time stamp format.</p>
pub fn get_deleted_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.deleted_at
}
/// Consumes the builder and constructs a [`VpcConnector`](crate::types::VpcConnector).
pub fn build(self) -> crate::types::VpcConnector {
crate::types::VpcConnector {
vpc_connector_name: self.vpc_connector_name,
vpc_connector_arn: self.vpc_connector_arn,
vpc_connector_revision: self.vpc_connector_revision.unwrap_or_default(),
subnets: self.subnets,
security_groups: self.security_groups,
status: self.status,
created_at: self.created_at,
deleted_at: self.deleted_at,
}
}
}