/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.elasticmapreduce.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* A configuration for Amazon EMR block public access. When BlockPublicSecurityGroupRules
is set to
* true
, Amazon EMR prevents cluster creation if one of the cluster's security groups has a rule that
* allows inbound traffic from 0.0.0.0/0 or ::/0 on a port, unless the port is specified as an exception using
* PermittedPublicSecurityGroupRuleRanges
.
*
* Indicates whether Amazon EMR block public access is enabled (true
) or disabled (false
).
* By default, the value is false
for accounts that have created Amazon EMR clusters before July 2019.
* For accounts created after this, the default is true
.
*
* Specifies ports and port ranges that are permitted to have security group rules that allow inbound traffic from
* all public sources. For example, if Port 23 (Telnet) is specified for
* PermittedPublicSecurityGroupRuleRanges
, Amazon EMR allows cluster creation if a security group
* associated with the cluster has a rule that allows inbound traffic on Port 23 from IPv4 0.0.0.0/0 or IPv6 port
* ::/0 as the source.
*
* By default, Port 22, which is used for SSH access to the cluster Amazon EC2 instances, is in the list of
* PermittedPublicSecurityGroupRuleRanges
.
*
* Indicates whether Amazon EMR block public access is enabled (true
) or disabled (false
).
* By default, the value is false
for accounts that have created Amazon EMR clusters before July 2019.
* For accounts created after this, the default is true
.
*
true
) or disabled (
* false
). By default, the value is false
for accounts that have created Amazon EMR
* clusters before July 2019. For accounts created after this, the default is true
.
*/
public void setBlockPublicSecurityGroupRules(Boolean blockPublicSecurityGroupRules) {
this.blockPublicSecurityGroupRules = blockPublicSecurityGroupRules;
}
/**
*
* Indicates whether Amazon EMR block public access is enabled (true
) or disabled (false
).
* By default, the value is false
for accounts that have created Amazon EMR clusters before July 2019.
* For accounts created after this, the default is true
.
*
true
) or disabled (
* false
). By default, the value is false
for accounts that have created Amazon
* EMR clusters before July 2019. For accounts created after this, the default is true
.
*/
public Boolean getBlockPublicSecurityGroupRules() {
return this.blockPublicSecurityGroupRules;
}
/**
*
* Indicates whether Amazon EMR block public access is enabled (true
) or disabled (false
).
* By default, the value is false
for accounts that have created Amazon EMR clusters before July 2019.
* For accounts created after this, the default is true
.
*
true
) or disabled (
* false
). By default, the value is false
for accounts that have created Amazon EMR
* clusters before July 2019. For accounts created after this, the default is true
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BlockPublicAccessConfiguration withBlockPublicSecurityGroupRules(Boolean blockPublicSecurityGroupRules) {
setBlockPublicSecurityGroupRules(blockPublicSecurityGroupRules);
return this;
}
/**
*
* Indicates whether Amazon EMR block public access is enabled (true
) or disabled (false
).
* By default, the value is false
for accounts that have created Amazon EMR clusters before July 2019.
* For accounts created after this, the default is true
.
*
true
) or disabled (
* false
). By default, the value is false
for accounts that have created Amazon
* EMR clusters before July 2019. For accounts created after this, the default is true
.
*/
public Boolean isBlockPublicSecurityGroupRules() {
return this.blockPublicSecurityGroupRules;
}
/**
*
* Specifies ports and port ranges that are permitted to have security group rules that allow inbound traffic from
* all public sources. For example, if Port 23 (Telnet) is specified for
* PermittedPublicSecurityGroupRuleRanges
, Amazon EMR allows cluster creation if a security group
* associated with the cluster has a rule that allows inbound traffic on Port 23 from IPv4 0.0.0.0/0 or IPv6 port
* ::/0 as the source.
*
* By default, Port 22, which is used for SSH access to the cluster Amazon EC2 instances, is in the list of
* PermittedPublicSecurityGroupRuleRanges
.
*
PermittedPublicSecurityGroupRuleRanges
, Amazon EMR allows cluster creation if a security
* group associated with the cluster has a rule that allows inbound traffic on Port 23 from IPv4 0.0.0.0/0
* or IPv6 port ::/0 as the source.
*
* By default, Port 22, which is used for SSH access to the cluster Amazon EC2 instances, is in the list of
*
* Specifies ports and port ranges that are permitted to have security group rules that allow inbound traffic from
* all public sources. For example, if Port 23 (Telnet) is specified for
*
* By default, Port 22, which is used for SSH access to the cluster Amazon EC2 instances, is in the list of
* PermittedPublicSecurityGroupRuleRanges
.
*/
public java.util.ListPermittedPublicSecurityGroupRuleRanges
, Amazon EMR allows cluster creation if a security group
* associated with the cluster has a rule that allows inbound traffic on Port 23 from IPv4 0.0.0.0/0 or IPv6 port
* ::/0 as the source.
* PermittedPublicSecurityGroupRuleRanges
.
* PermittedPublicSecurityGroupRuleRanges
, Amazon EMR allows cluster creation if a security
* group associated with the cluster has a rule that allows inbound traffic on Port 23 from IPv4 0.0.0.0/0 or
* IPv6 port ::/0 as the source.
* By default, Port 22, which is used for SSH access to the cluster Amazon EC2 instances, is in the list of
*
* Specifies ports and port ranges that are permitted to have security group rules that allow inbound traffic from
* all public sources. For example, if Port 23 (Telnet) is specified for
*
* By default, Port 22, which is used for SSH access to the cluster Amazon EC2 instances, is in the list of
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setPermittedPublicSecurityGroupRuleRanges(java.util.Collection)} or
* {@link #withPermittedPublicSecurityGroupRuleRanges(java.util.Collection)} if you want to override the existing
* values.
* PermittedPublicSecurityGroupRuleRanges
.
*/
public void setPermittedPublicSecurityGroupRuleRanges(java.util.CollectionPermittedPublicSecurityGroupRuleRanges
, Amazon EMR allows cluster creation if a security group
* associated with the cluster has a rule that allows inbound traffic on Port 23 from IPv4 0.0.0.0/0 or IPv6 port
* ::/0 as the source.
* PermittedPublicSecurityGroupRuleRanges
.
* PermittedPublicSecurityGroupRuleRanges
, Amazon EMR allows cluster creation if a security
* group associated with the cluster has a rule that allows inbound traffic on Port 23 from IPv4 0.0.0.0/0 or
* IPv6 port ::/0 as the source.
* By default, Port 22, which is used for SSH access to the cluster Amazon EC2 instances, is in the list of
*
* Specifies ports and port ranges that are permitted to have security group rules that allow inbound traffic from
* all public sources. For example, if Port 23 (Telnet) is specified for
*
* By default, Port 22, which is used for SSH access to the cluster Amazon EC2 instances, is in the list of
* PermittedPublicSecurityGroupRuleRanges
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BlockPublicAccessConfiguration withPermittedPublicSecurityGroupRuleRanges(PortRange... permittedPublicSecurityGroupRuleRanges) {
if (this.permittedPublicSecurityGroupRuleRanges == null) {
setPermittedPublicSecurityGroupRuleRanges(new com.amazonaws.internal.SdkInternalListPermittedPublicSecurityGroupRuleRanges
, Amazon EMR allows cluster creation if a security group
* associated with the cluster has a rule that allows inbound traffic on Port 23 from IPv4 0.0.0.0/0 or IPv6 port
* ::/0 as the source.
* PermittedPublicSecurityGroupRuleRanges
.
* PermittedPublicSecurityGroupRuleRanges
, Amazon EMR allows cluster creation if a security
* group associated with the cluster has a rule that allows inbound traffic on Port 23 from IPv4 0.0.0.0/0 or
* IPv6 port ::/0 as the source.
* By default, Port 22, which is used for SSH access to the cluster Amazon EC2 instances, is in the list of
* PermittedPublicSecurityGroupRuleRanges
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BlockPublicAccessConfiguration withPermittedPublicSecurityGroupRuleRanges(java.util.Collection