GetBlockPublicAccessConfiguration
Returns the Amazon EMR block public access configuration for your AWS account in the current Region. For more information see Configure Block Public Access for Amazon EMR in the Amazon EMR Management Guide.
Response Syntax
{
"BlockPublicAccessConfiguration": {
"BlockPublicSecurityGroupRules": boolean,
"PermittedPublicSecurityGroupRuleRanges": [
{
"MaxRange": number,
"MinRange": number
}
]
},
"BlockPublicAccessConfigurationMetadata": {
"CreatedByArn": "string",
"CreationDateTime": number
}
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- BlockPublicAccessConfiguration
-
A configuration for Amazon EMR block public access. The configuration applies to all clusters created in your account for the current Region. The configuration specifies whether block public access is enabled. If block public access is enabled, security groups associated with the cluster cannot have rules that allow inbound traffic from 0.0.0.0/0 or ::/0 on a port, unless the port is specified as an exception using
PermittedPublicSecurityGroupRuleRanges
in theBlockPublicAccessConfiguration
. By default, Port 22 (SSH) is an exception, and public access is allowed on this port. You can change this by updating the block public access configuration to remove the exception.Note
For accounts that created clusters in a Region before November 25, 2019, block public access is disabled by default in that Region. To use this feature, you must manually enable and configure it. For accounts that did not create an Amazon EMR cluster in a Region before this date, block public access is enabled by default in that Region.
Type: BlockPublicAccessConfiguration object
- BlockPublicAccessConfigurationMetadata
-
Properties that describe the AWS principal that created the
BlockPublicAccessConfiguration
using thePutBlockPublicAccessConfiguration
action as well as the date and time that the configuration was created. Each time a configuration for block public access is updated, Amazon EMR updates this metadata.Type: BlockPublicAccessConfigurationMetadata object
Errors
For information about the errors that are common to all actions, see Common Errors.
- InternalServerException
-
This exception occurs when there is an internal failure in the Amazon EMR service.
HTTP Status Code: 500
- InvalidRequestException
-
This exception occurs when there is something wrong with user input.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: