pulumi_wasm_providers_aws_mini::ec2::security_group_rule

Struct SecurityGroupRuleArgsBuilder

source
pub struct SecurityGroupRuleArgsBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build_struct().

Implementations§

source§

impl<S: State> SecurityGroupRuleArgsBuilder<S>

source

pub fn build_struct(self) -> SecurityGroupRuleArgs
where S: IsComplete,

Finish building and return the requested object

source

pub fn cidr_blocks( self, value: impl Into<Output<Option<Vec<String>>>>, ) -> SecurityGroupRuleArgsBuilder<SetCidrBlocks<S>>
where S::CidrBlocks: IsUnset,

Optional (Some / Option setters). Default: <pulumi_wasm_rust::Output<Option<Vec<String>>> as Default>::default().

List of CIDR blocks. Cannot be specified with source_security_group_id or self.

source

pub fn maybe_cidr_blocks( self, value: Option<impl Into<Output<Option<Vec<String>>>>>, ) -> SecurityGroupRuleArgsBuilder<SetCidrBlocks<S>>
where S::CidrBlocks: IsUnset,

Optional (Some / Option setters). Default: <pulumi_wasm_rust::Output<Option<Vec<String>>> as Default>::default().

List of CIDR blocks. Cannot be specified with source_security_group_id or self.

source

pub fn description( self, value: impl Into<Output<Option<String>>>, ) -> SecurityGroupRuleArgsBuilder<SetDescription<S>>
where S::Description: IsUnset,

Optional (Some / Option setters). Default: <pulumi_wasm_rust::Output<Option<String>> as Default>::default().

Description of the rule.

source

pub fn maybe_description( self, value: Option<impl Into<Output<Option<String>>>>, ) -> SecurityGroupRuleArgsBuilder<SetDescription<S>>
where S::Description: IsUnset,

Optional (Some / Option setters). Default: <pulumi_wasm_rust::Output<Option<String>> as Default>::default().

Description of the rule.

source

pub fn from_port( self, value: impl Into<Output<i32>>, ) -> SecurityGroupRuleArgsBuilder<SetFromPort<S>>
where S::FromPort: IsUnset,

Required.

Start port (or ICMP type number if protocol is “icmp” or “icmpv6”).

source

pub fn ipv6_cidr_blocks( self, value: impl Into<Output<Option<Vec<String>>>>, ) -> SecurityGroupRuleArgsBuilder<SetIpv6CidrBlocks<S>>
where S::Ipv6CidrBlocks: IsUnset,

Optional (Some / Option setters). Default: <pulumi_wasm_rust::Output<Option<Vec<String>>> as Default>::default().

List of IPv6 CIDR blocks. Cannot be specified with source_security_group_id or self.

source

pub fn maybe_ipv6_cidr_blocks( self, value: Option<impl Into<Output<Option<Vec<String>>>>>, ) -> SecurityGroupRuleArgsBuilder<SetIpv6CidrBlocks<S>>
where S::Ipv6CidrBlocks: IsUnset,

Optional (Some / Option setters). Default: <pulumi_wasm_rust::Output<Option<Vec<String>>> as Default>::default().

List of IPv6 CIDR blocks. Cannot be specified with source_security_group_id or self.

source

pub fn prefix_list_ids( self, value: impl Into<Output<Option<Vec<String>>>>, ) -> SecurityGroupRuleArgsBuilder<SetPrefixListIds<S>>
where S::PrefixListIds: IsUnset,

Optional (Some / Option setters). Default: <pulumi_wasm_rust::Output<Option<Vec<String>>> as Default>::default().

List of Prefix List IDs.

source

pub fn maybe_prefix_list_ids( self, value: Option<impl Into<Output<Option<Vec<String>>>>>, ) -> SecurityGroupRuleArgsBuilder<SetPrefixListIds<S>>
where S::PrefixListIds: IsUnset,

Optional (Some / Option setters). Default: <pulumi_wasm_rust::Output<Option<Vec<String>>> as Default>::default().

List of Prefix List IDs.

source

pub fn protocol( self, value: impl Into<Output<String>>, ) -> SecurityGroupRuleArgsBuilder<SetProtocol<S>>
where S::Protocol: IsUnset,

Required.

Protocol. If not icmp, icmpv6, tcp, udp, or all use the protocol number

source

pub fn security_group_id( self, value: impl Into<Output<String>>, ) -> SecurityGroupRuleArgsBuilder<SetSecurityGroupId<S>>
where S::SecurityGroupId: IsUnset,

Required.

Security group to apply this rule to.

source

pub fn self_( self, value: impl Into<Output<Option<bool>>>, ) -> SecurityGroupRuleArgsBuilder<SetSelf_<S>>
where S::Self_: IsUnset,

Optional (Some / Option setters). Default: <pulumi_wasm_rust::Output<Option<bool>> as Default>::default().

Whether the security group itself will be added as a source to this ingress rule. Cannot be specified with cidr_blocks, ipv6_cidr_blocks, or source_security_group_id.

source

pub fn maybe_self_( self, value: Option<impl Into<Output<Option<bool>>>>, ) -> SecurityGroupRuleArgsBuilder<SetSelf_<S>>
where S::Self_: IsUnset,

Optional (Some / Option setters). Default: <pulumi_wasm_rust::Output<Option<bool>> as Default>::default().

Whether the security group itself will be added as a source to this ingress rule. Cannot be specified with cidr_blocks, ipv6_cidr_blocks, or source_security_group_id.

source

pub fn source_security_group_id( self, value: impl Into<Output<Option<String>>>, ) -> SecurityGroupRuleArgsBuilder<SetSourceSecurityGroupId<S>>
where S::SourceSecurityGroupId: IsUnset,

Optional (Some / Option setters). Default: <pulumi_wasm_rust::Output<Option<String>> as Default>::default().

Security group id to allow access to/from, depending on the type. Cannot be specified with cidr_blocks, ipv6_cidr_blocks, or self.

source

pub fn maybe_source_security_group_id( self, value: Option<impl Into<Output<Option<String>>>>, ) -> SecurityGroupRuleArgsBuilder<SetSourceSecurityGroupId<S>>
where S::SourceSecurityGroupId: IsUnset,

Optional (Some / Option setters). Default: <pulumi_wasm_rust::Output<Option<String>> as Default>::default().

Security group id to allow access to/from, depending on the type. Cannot be specified with cidr_blocks, ipv6_cidr_blocks, or self.

source

pub fn to_port( self, value: impl Into<Output<i32>>, ) -> SecurityGroupRuleArgsBuilder<SetToPort<S>>
where S::ToPort: IsUnset,

Required.

End port (or ICMP code if protocol is “icmp”).

source

pub fn type_( self, value: impl Into<Output<String>>, ) -> SecurityGroupRuleArgsBuilder<SetType<S>>
where S::Type: IsUnset,

Required.

Type of rule being created. Valid options are ingress (inbound) or egress (outbound).

The following arguments are optional:

Note Although cidr_blocks, ipv6_cidr_blocks, prefix_list_ids, and source_security_group_id are all marked as optional, you must provide one of them in order to configure the source of the traffic.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.