/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace EMR { namespace Model { /** *

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.

See Also:

* AWS * API Reference

*/ class AWS_EMR_API BlockPublicAccessConfiguration { public: BlockPublicAccessConfiguration(); BlockPublicAccessConfiguration(Aws::Utils::Json::JsonView jsonValue); BlockPublicAccessConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** *

Indicates whether EMR block public access is enabled (true) or * disabled (false). By default, the value is false for * accounts that have created EMR clusters before July 2019. For accounts created * after this, the default is true.

*/ inline bool GetBlockPublicSecurityGroupRules() const{ return m_blockPublicSecurityGroupRules; } /** *

Indicates whether EMR block public access is enabled (true) or * disabled (false). By default, the value is false for * accounts that have created EMR clusters before July 2019. For accounts created * after this, the default is true.

*/ inline bool BlockPublicSecurityGroupRulesHasBeenSet() const { return m_blockPublicSecurityGroupRulesHasBeenSet; } /** *

Indicates whether EMR block public access is enabled (true) or * disabled (false). By default, the value is false for * accounts that have created EMR clusters before July 2019. For accounts created * after this, the default is true.

*/ inline void SetBlockPublicSecurityGroupRules(bool value) { m_blockPublicSecurityGroupRulesHasBeenSet = true; m_blockPublicSecurityGroupRules = value; } /** *

Indicates whether EMR block public access is enabled (true) or * disabled (false). By default, the value is false for * accounts that have created EMR clusters before July 2019. For accounts created * after this, the default is true.

*/ inline BlockPublicAccessConfiguration& WithBlockPublicSecurityGroupRules(bool value) { SetBlockPublicSecurityGroupRules(value); return *this;} /** *

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 * EC2 instances, is in the list of * PermittedPublicSecurityGroupRuleRanges.

*/ inline const Aws::Vector& GetPermittedPublicSecurityGroupRuleRanges() const{ return m_permittedPublicSecurityGroupRuleRanges; } /** *

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 * EC2 instances, is in the list of * PermittedPublicSecurityGroupRuleRanges.

*/ inline bool PermittedPublicSecurityGroupRuleRangesHasBeenSet() const { return m_permittedPublicSecurityGroupRuleRangesHasBeenSet; } /** *

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 * EC2 instances, is in the list of * PermittedPublicSecurityGroupRuleRanges.

*/ inline void SetPermittedPublicSecurityGroupRuleRanges(const Aws::Vector& value) { m_permittedPublicSecurityGroupRuleRangesHasBeenSet = true; m_permittedPublicSecurityGroupRuleRanges = value; } /** *

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 * EC2 instances, is in the list of * PermittedPublicSecurityGroupRuleRanges.

*/ inline void SetPermittedPublicSecurityGroupRuleRanges(Aws::Vector&& value) { m_permittedPublicSecurityGroupRuleRangesHasBeenSet = true; m_permittedPublicSecurityGroupRuleRanges = std::move(value); } /** *

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 * EC2 instances, is in the list of * PermittedPublicSecurityGroupRuleRanges.

*/ inline BlockPublicAccessConfiguration& WithPermittedPublicSecurityGroupRuleRanges(const Aws::Vector& value) { SetPermittedPublicSecurityGroupRuleRanges(value); return *this;} /** *

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 * EC2 instances, is in the list of * PermittedPublicSecurityGroupRuleRanges.

*/ inline BlockPublicAccessConfiguration& WithPermittedPublicSecurityGroupRuleRanges(Aws::Vector&& value) { SetPermittedPublicSecurityGroupRuleRanges(std::move(value)); return *this;} /** *

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 * EC2 instances, is in the list of * PermittedPublicSecurityGroupRuleRanges.

*/ inline BlockPublicAccessConfiguration& AddPermittedPublicSecurityGroupRuleRanges(const PortRange& value) { m_permittedPublicSecurityGroupRuleRangesHasBeenSet = true; m_permittedPublicSecurityGroupRuleRanges.push_back(value); return *this; } /** *

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 * EC2 instances, is in the list of * PermittedPublicSecurityGroupRuleRanges.

*/ inline BlockPublicAccessConfiguration& AddPermittedPublicSecurityGroupRuleRanges(PortRange&& value) { m_permittedPublicSecurityGroupRuleRangesHasBeenSet = true; m_permittedPublicSecurityGroupRuleRanges.push_back(std::move(value)); return *this; } private: bool m_blockPublicSecurityGroupRules; bool m_blockPublicSecurityGroupRulesHasBeenSet; Aws::Vector m_permittedPublicSecurityGroupRuleRanges; bool m_permittedPublicSecurityGroupRuleRangesHasBeenSet; }; } // namespace Model } // namespace EMR } // namespace Aws