< Back

Add-CfnEC2_SecurityGroupIngressResource

Sat Jan 11, 2020 6:22 am

NAME Add-CfnEC2_SecurityGroupIngressResource



SYNOPSIS

The AWS::EC2::SecurityGroupIngress type adds an ingress rule to an Amazon EC2 or VPC security group.





SYNTAX

Add-CfnEC2_SecurityGroupIngressResource [-ResourceName] <String> [-CidrIp <String>] [-FromPort <String>] [-GroupId

<String>] [-GroupName <String>] [-IpProtocol <String>] [-SourceSecurityGroupId <String>] [-SourceSecurityGroupName

<String>] [-SourceSecurityGroupOwnerId <String>] [-ToPort <String>] [-DeletionPolicy <String>] [-Metadata

<Hashtable>] [-DependsOn <Array>] [[-PropertiesBlock] <ScriptBlock>] [-Condition <Object>] [<CommonParameters>]





DESCRIPTION





PARAMETERS

-ResourceName <String>



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-CidrIp <String>

The CIDR range. If you specify SourceSecurityGroupName, do not specify CidrIp.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-FromPort <String>

Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates

a wildcard.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-GroupId <String>

Name of the EC2 security group to modify. This value can be a reference to an AWS::EC2::SecurityGroup resource

or the name of an existing EC2 security group. Required: Yes, for VPC security groups; can be used instead of

GroupName for EC2 security groups.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-GroupName <String>

Name of the EC2 security group to modify. This value can be a reference to an AWS::EC2::SecurityGroup resource

or the name of an existing EC2 security group. Required: Can be used instead of GroupId for EC2 security

groups.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-IpProtocol <String>

IP protocol name or number.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SourceSecurityGroupId <String>

For VPC security groups only. Specifies the ID of the Amazon EC2 Security Group to allow access. If you

specify CidrIp, do not specify SourceSecurityGroupId.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SourceSecurityGroupName <String>

Specifies the name of the Amazon EC2 Security Group to allow access. If you specify CidrIp, do not specify

SourceSecurityGroupName.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SourceSecurityGroupOwnerId <String>

Specifies the AWS Account ID of the owner of the Amazon EC2 Security Group specified in the

SourceSecurityGroupName property.



If you specify SourceSecurityGroupName and that security group is owned by a different account than the

account creating the stack, you must specify the SourceSecurityGroupOwnerId; otherwise, this property is

optional.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ToPort <String>

End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1 indicates a wildcard.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DeletionPolicy <String>

With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is

deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has

no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default.



To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any

resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to

use or modify those resources after you delete their stacks.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Metadata <Hashtable>

The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata

attribute to a resource, you can add data in JSON format to the resource declaration. In addition, you can use

intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute

to add those interpreted values.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DependsOn <Array>

With the DependsOn attribute you can specify that the creation of a specific resource follows another. When

you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource

specified in the DependsOn attribute. You can use the DependsOn attribute with any resource.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-PropertiesBlock <ScriptBlock>

Allows you to declare a block of one or more Property statements.



A Properties block allows you to side-step the rigid, type-enforced literal properties of a typed resource,

and specify Property assignments that may include CloudFormation function calls or references, or computed

values.



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Condition <Object>



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS





RELATED LINKS

http://docs.aws.amazon.com/AWSCloudForm ... olicy.html

http://docs.aws.amazon.com/AWSCloudForm ... adata.html

http://docs.aws.amazon.com/AWSCloudForm ... ndson.html

http://docs.aws.amazon.com/AWSCloudForm ... e-ref.html

http://docs.aws.amazon.com/search/doc-s ... GroupIngre

ss