Amazon Elastic MapReduce
API Reference (API Version 2009-03-31)

PutBlockPublicAccessConfiguration

Creates or updates an 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.

Request Syntax

{ "BlockPublicAccessConfiguration": { "BlockPublicSecurityGroupRules": boolean, "PermittedPublicSecurityGroupRuleRanges": [ { "MaxRange": number, "MinRange": number } ] } }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

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 the BlockPublicAccessConfiguration. By default, Port 22 (SSH) is an exception, and public access is allowed on this port. You can change this by updating BlockPublicSecurityGroupRules to remove the exception.

Type: BlockPublicAccessConfiguration object

Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

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 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: