How do i add desciption when using Grant-EC2SecurityGroupIngress?
What is the proper way to add a description to an IP address that is added with this command.
Grant-EC2SecurityGroupIngress -GroupName 'Postgres GIS' -ProfileName default -IpPermission @{IpProtocol='tcp'; FromPort='5432'; ToPort='5432'; IpRanges="$($ip.CidrIP)";}
When I go to AWS security group and look at inbound tab I see the IP address is added but description is blank. I want to fill this in. How?
Do I have to try something else like this command
Update-
EC2SecurityGroupRuleIngressDescription to change it?
Thanks
amazon-web-services powershell
add a comment |
What is the proper way to add a description to an IP address that is added with this command.
Grant-EC2SecurityGroupIngress -GroupName 'Postgres GIS' -ProfileName default -IpPermission @{IpProtocol='tcp'; FromPort='5432'; ToPort='5432'; IpRanges="$($ip.CidrIP)";}
When I go to AWS security group and look at inbound tab I see the IP address is added but description is blank. I want to fill this in. How?
Do I have to try something else like this command
Update-
EC2SecurityGroupRuleIngressDescription to change it?
Thanks
amazon-web-services powershell
add a comment |
What is the proper way to add a description to an IP address that is added with this command.
Grant-EC2SecurityGroupIngress -GroupName 'Postgres GIS' -ProfileName default -IpPermission @{IpProtocol='tcp'; FromPort='5432'; ToPort='5432'; IpRanges="$($ip.CidrIP)";}
When I go to AWS security group and look at inbound tab I see the IP address is added but description is blank. I want to fill this in. How?
Do I have to try something else like this command
Update-
EC2SecurityGroupRuleIngressDescription to change it?
Thanks
amazon-web-services powershell
What is the proper way to add a description to an IP address that is added with this command.
Grant-EC2SecurityGroupIngress -GroupName 'Postgres GIS' -ProfileName default -IpPermission @{IpProtocol='tcp'; FromPort='5432'; ToPort='5432'; IpRanges="$($ip.CidrIP)";}
When I go to AWS security group and look at inbound tab I see the IP address is added but description is blank. I want to fill this in. How?
Do I have to try something else like this command
Update-
EC2SecurityGroupRuleIngressDescription to change it?
Thanks
amazon-web-services powershell
amazon-web-services powershell
edited Jan 3 at 7:51
varnit
1,277519
1,277519
asked Jan 2 at 19:17
John DeereJohn Deere
31
31
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I would have expected you to be able to use Description="xyz"
in the IpPermission list but, as you've confimed, it's not supported. It looks like this may be missing from the Grant-EC2SecurityGroupIngress cmdlet but you can set the description as follows (from example 6):
PS C:> $IpRange = New-Object -TypeName Amazon.EC2.Model.IpRange
PS C:> $IpRange.CidrIp = "5.5.5.5/32"
PS C:> $IpRange.Description = "SSH from Office"
PS C:> $IpPermission = New-Object Amazon.EC2.Model.IpPermission
PS C:> $IpPermission.IpProtocol = "tcp"
PS C:> $IpPermission.ToPort = 22
PS C:> $IpPermission.FromPort = 22
PS C:> $IpPermission.Ipv4Ranges = $IpRange
PS C:> Grant-EC2SecurityGroupIngress -GroupId sg-1234abcd -IpPermission $IpPermission
Simply adding description to ippermission didn't work, however example 6 did work. I had read that page before but missed that example. THanks!
– John Deere
Jan 2 at 21:23
Strange. I think it should be supported, but glad you worked around it. Have updated my answer.
– jarmod
Jan 2 at 22:47
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54011978%2fhow-do-i-add-desciption-when-using-grant-ec2securitygroupingress%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I would have expected you to be able to use Description="xyz"
in the IpPermission list but, as you've confimed, it's not supported. It looks like this may be missing from the Grant-EC2SecurityGroupIngress cmdlet but you can set the description as follows (from example 6):
PS C:> $IpRange = New-Object -TypeName Amazon.EC2.Model.IpRange
PS C:> $IpRange.CidrIp = "5.5.5.5/32"
PS C:> $IpRange.Description = "SSH from Office"
PS C:> $IpPermission = New-Object Amazon.EC2.Model.IpPermission
PS C:> $IpPermission.IpProtocol = "tcp"
PS C:> $IpPermission.ToPort = 22
PS C:> $IpPermission.FromPort = 22
PS C:> $IpPermission.Ipv4Ranges = $IpRange
PS C:> Grant-EC2SecurityGroupIngress -GroupId sg-1234abcd -IpPermission $IpPermission
Simply adding description to ippermission didn't work, however example 6 did work. I had read that page before but missed that example. THanks!
– John Deere
Jan 2 at 21:23
Strange. I think it should be supported, but glad you worked around it. Have updated my answer.
– jarmod
Jan 2 at 22:47
add a comment |
I would have expected you to be able to use Description="xyz"
in the IpPermission list but, as you've confimed, it's not supported. It looks like this may be missing from the Grant-EC2SecurityGroupIngress cmdlet but you can set the description as follows (from example 6):
PS C:> $IpRange = New-Object -TypeName Amazon.EC2.Model.IpRange
PS C:> $IpRange.CidrIp = "5.5.5.5/32"
PS C:> $IpRange.Description = "SSH from Office"
PS C:> $IpPermission = New-Object Amazon.EC2.Model.IpPermission
PS C:> $IpPermission.IpProtocol = "tcp"
PS C:> $IpPermission.ToPort = 22
PS C:> $IpPermission.FromPort = 22
PS C:> $IpPermission.Ipv4Ranges = $IpRange
PS C:> Grant-EC2SecurityGroupIngress -GroupId sg-1234abcd -IpPermission $IpPermission
Simply adding description to ippermission didn't work, however example 6 did work. I had read that page before but missed that example. THanks!
– John Deere
Jan 2 at 21:23
Strange. I think it should be supported, but glad you worked around it. Have updated my answer.
– jarmod
Jan 2 at 22:47
add a comment |
I would have expected you to be able to use Description="xyz"
in the IpPermission list but, as you've confimed, it's not supported. It looks like this may be missing from the Grant-EC2SecurityGroupIngress cmdlet but you can set the description as follows (from example 6):
PS C:> $IpRange = New-Object -TypeName Amazon.EC2.Model.IpRange
PS C:> $IpRange.CidrIp = "5.5.5.5/32"
PS C:> $IpRange.Description = "SSH from Office"
PS C:> $IpPermission = New-Object Amazon.EC2.Model.IpPermission
PS C:> $IpPermission.IpProtocol = "tcp"
PS C:> $IpPermission.ToPort = 22
PS C:> $IpPermission.FromPort = 22
PS C:> $IpPermission.Ipv4Ranges = $IpRange
PS C:> Grant-EC2SecurityGroupIngress -GroupId sg-1234abcd -IpPermission $IpPermission
I would have expected you to be able to use Description="xyz"
in the IpPermission list but, as you've confimed, it's not supported. It looks like this may be missing from the Grant-EC2SecurityGroupIngress cmdlet but you can set the description as follows (from example 6):
PS C:> $IpRange = New-Object -TypeName Amazon.EC2.Model.IpRange
PS C:> $IpRange.CidrIp = "5.5.5.5/32"
PS C:> $IpRange.Description = "SSH from Office"
PS C:> $IpPermission = New-Object Amazon.EC2.Model.IpPermission
PS C:> $IpPermission.IpProtocol = "tcp"
PS C:> $IpPermission.ToPort = 22
PS C:> $IpPermission.FromPort = 22
PS C:> $IpPermission.Ipv4Ranges = $IpRange
PS C:> Grant-EC2SecurityGroupIngress -GroupId sg-1234abcd -IpPermission $IpPermission
edited Jan 2 at 22:47
answered Jan 2 at 20:26
jarmodjarmod
20.1k64149
20.1k64149
Simply adding description to ippermission didn't work, however example 6 did work. I had read that page before but missed that example. THanks!
– John Deere
Jan 2 at 21:23
Strange. I think it should be supported, but glad you worked around it. Have updated my answer.
– jarmod
Jan 2 at 22:47
add a comment |
Simply adding description to ippermission didn't work, however example 6 did work. I had read that page before but missed that example. THanks!
– John Deere
Jan 2 at 21:23
Strange. I think it should be supported, but glad you worked around it. Have updated my answer.
– jarmod
Jan 2 at 22:47
Simply adding description to ippermission didn't work, however example 6 did work. I had read that page before but missed that example. THanks!
– John Deere
Jan 2 at 21:23
Simply adding description to ippermission didn't work, however example 6 did work. I had read that page before but missed that example. THanks!
– John Deere
Jan 2 at 21:23
Strange. I think it should be supported, but glad you worked around it. Have updated my answer.
– jarmod
Jan 2 at 22:47
Strange. I think it should be supported, but glad you worked around it. Have updated my answer.
– jarmod
Jan 2 at 22:47
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54011978%2fhow-do-i-add-desciption-when-using-grant-ec2securitygroupingress%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown