You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::LakeFormation::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-lakeformation/lib/aws-sdk-lakeformation/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::SharedCredentials - Used for loading credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2 IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails to enable retries and extended timeouts.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is search for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test endpoints. This should be avalid HTTP(S) URI.

  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available. Defaults to false.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors and auth errors from expired credentials.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.

  • :secret_access_key (String)
  • :session_token (String)
  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disable response data type conversions. This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

    When :simple_json is enabled, the request parameters hash must be formatted exactly as the DynamoDB API expects.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before rasing a Timeout::Error.

  • :http_read_timeout (Integer) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session yeidled by #session_for.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idble before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session yeidled by #session_for.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.



261
262
263
# File 'gems/aws-sdk-lakeformation/lib/aws-sdk-lakeformation/client.rb', line 261

def initialize(*args)
  super
end

Instance Method Details

#batch_grant_permissions(params = {}) ⇒ Types::BatchGrantPermissionsResponse

Batch operation to grant permissions to the principal.

Examples:

Request syntax with placeholder values


resp = client.batch_grant_permissions({
  catalog_id: "CatalogIdString",
  entries: [ # required
    {
      id: "Identifier", # required
      principal: {
        data_lake_principal_identifier: "DataLakePrincipalString",
      },
      resource: {
        catalog: {
        },
        database: {
          name: "NameString", # required
        },
        table: {
          database_name: "NameString", # required
          name: "NameString", # required
        },
        table_with_columns: {
          database_name: "NameString",
          name: "NameString",
          column_names: ["NameString"],
          column_wildcard: {
            excluded_column_names: ["NameString"],
          },
        },
        data_location: {
          resource_arn: "ResourceArnString", # required
        },
      },
      permissions: ["ALL"], # accepts ALL, SELECT, ALTER, DROP, DELETE, INSERT, CREATE_DATABASE, CREATE_TABLE, DATA_LOCATION_ACCESS
      permissions_with_grant_option: ["ALL"], # accepts ALL, SELECT, ALTER, DROP, DELETE, INSERT, CREATE_DATABASE, CREATE_TABLE, DATA_LOCATION_ACCESS
    },
  ],
})

Response structure


resp.failures #=> Array
resp.failures[0].request_entry.id #=> String
resp.failures[0].request_entry.principal.data_lake_principal_identifier #=> String
resp.failures[0].request_entry.resource.database.name #=> String
resp.failures[0].request_entry.resource.table.database_name #=> String
resp.failures[0].request_entry.resource.table.name #=> String
resp.failures[0].request_entry.resource.table_with_columns.database_name #=> String
resp.failures[0].request_entry.resource.table_with_columns.name #=> String
resp.failures[0].request_entry.resource.table_with_columns.column_names #=> Array
resp.failures[0].request_entry.resource.table_with_columns.column_names[0] #=> String
resp.failures[0].request_entry.resource.table_with_columns.column_wildcard.excluded_column_names #=> Array
resp.failures[0].request_entry.resource.table_with_columns.column_wildcard.excluded_column_names[0] #=> String
resp.failures[0].request_entry.resource.data_location.resource_arn #=> String
resp.failures[0].request_entry.permissions #=> Array
resp.failures[0].request_entry.permissions[0] #=> String, one of "ALL", "SELECT", "ALTER", "DROP", "DELETE", "INSERT", "CREATE_DATABASE", "CREATE_TABLE", "DATA_LOCATION_ACCESS"
resp.failures[0].request_entry.permissions_with_grant_option #=> Array
resp.failures[0].request_entry.permissions_with_grant_option[0] #=> String, one of "ALL", "SELECT", "ALTER", "DROP", "DELETE", "INSERT", "CREATE_DATABASE", "CREATE_TABLE", "DATA_LOCATION_ACCESS"
resp.failures[0].error.error_code #=> String
resp.failures[0].error.error_message #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :catalog_id (String)

    The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

  • :entries (required, Array<Types::BatchPermissionsRequestEntry>)

    A list of up to 20 entries for resource permissions to be granted by batch operation to the principal.

Returns:

See Also:



347
348
349
350
# File 'gems/aws-sdk-lakeformation/lib/aws-sdk-lakeformation/client.rb', line 347

def batch_grant_permissions(params = {}, options = {})
  req = build_request(:batch_grant_permissions, params)
  req.send_request(options)
end

#batch_revoke_permissions(params = {}) ⇒ Types::BatchRevokePermissionsResponse

Batch operation to revoke permissions from the principal.

Examples:

Request syntax with placeholder values


resp = client.batch_revoke_permissions({
  catalog_id: "CatalogIdString",
  entries: [ # required
    {
      id: "Identifier", # required
      principal: {
        data_lake_principal_identifier: "DataLakePrincipalString",
      },
      resource: {
        catalog: {
        },
        database: {
          name: "NameString", # required
        },
        table: {
          database_name: "NameString", # required
          name: "NameString", # required
        },
        table_with_columns: {
          database_name: "NameString",
          name: "NameString",
          column_names: ["NameString"],
          column_wildcard: {
            excluded_column_names: ["NameString"],
          },
        },
        data_location: {
          resource_arn: "ResourceArnString", # required
        },
      },
      permissions: ["ALL"], # accepts ALL, SELECT, ALTER, DROP, DELETE, INSERT, CREATE_DATABASE, CREATE_TABLE, DATA_LOCATION_ACCESS
      permissions_with_grant_option: ["ALL"], # accepts ALL, SELECT, ALTER, DROP, DELETE, INSERT, CREATE_DATABASE, CREATE_TABLE, DATA_LOCATION_ACCESS
    },
  ],
})

Response structure


resp.failures #=> Array
resp.failures[0].request_entry.id #=> String
resp.failures[0].request_entry.principal.data_lake_principal_identifier #=> String
resp.failures[0].request_entry.resource.database.name #=> String
resp.failures[0].request_entry.resource.table.database_name #=> String
resp.failures[0].request_entry.resource.table.name #=> String
resp.failures[0].request_entry.resource.table_with_columns.database_name #=> String
resp.failures[0].request_entry.resource.table_with_columns.name #=> String
resp.failures[0].request_entry.resource.table_with_columns.column_names #=> Array
resp.failures[0].request_entry.resource.table_with_columns.column_names[0] #=> String
resp.failures[0].request_entry.resource.table_with_columns.column_wildcard.excluded_column_names #=> Array
resp.failures[0].request_entry.resource.table_with_columns.column_wildcard.excluded_column_names[0] #=> String
resp.failures[0].request_entry.resource.data_location.resource_arn #=> String
resp.failures[0].request_entry.permissions #=> Array
resp.failures[0].request_entry.permissions[0] #=> String, one of "ALL", "SELECT", "ALTER", "DROP", "DELETE", "INSERT", "CREATE_DATABASE", "CREATE_TABLE", "DATA_LOCATION_ACCESS"
resp.failures[0].request_entry.permissions_with_grant_option #=> Array
resp.failures[0].request_entry.permissions_with_grant_option[0] #=> String, one of "ALL", "SELECT", "ALTER", "DROP", "DELETE", "INSERT", "CREATE_DATABASE", "CREATE_TABLE", "DATA_LOCATION_ACCESS"
resp.failures[0].error.error_code #=> String
resp.failures[0].error.error_message #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :catalog_id (String)

    The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

  • :entries (required, Array<Types::BatchPermissionsRequestEntry>)

    A list of up to 20 entries for resource permissions to be revoked by batch operation to the principal.

Returns:

See Also:



432
433
434
435
# File 'gems/aws-sdk-lakeformation/lib/aws-sdk-lakeformation/client.rb', line 432

def batch_revoke_permissions(params = {}, options = {})
  req = build_request(:batch_revoke_permissions, params)
  req.send_request(options)
end

#deregister_resource(params = {}) ⇒ Struct

Deregisters the resource as managed by the Data Catalog.

When you deregister a path, Lake Formation removes the path from the inline policy attached to your service-linked role.

Examples:

Request syntax with placeholder values


resp = client.deregister_resource({
  resource_arn: "ResourceArnString", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource that you want to deregister.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



458
459
460
461
# File 'gems/aws-sdk-lakeformation/lib/aws-sdk-lakeformation/client.rb', line 458

def deregister_resource(params = {}, options = {})
  req = build_request(:deregister_resource, params)
  req.send_request(options)
end

#describe_resource(params = {}) ⇒ Types::DescribeResourceResponse

Retrieves the current data access role for the given resource registered in AWS Lake Formation.

Examples:

Request syntax with placeholder values


resp = client.describe_resource({
  resource_arn: "ResourceArnString", # required
})

Response structure


resp.resource_info.resource_arn #=> String
resp.resource_info.role_arn #=> String
resp.resource_info.last_modified #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The resource ARN.

Returns:

See Also:



489
490
491
492
# File 'gems/aws-sdk-lakeformation/lib/aws-sdk-lakeformation/client.rb', line 489

def describe_resource(params = {}, options = {})
  req = build_request(:describe_resource, params)
  req.send_request(options)
end

#get_data_lake_settings(params = {}) ⇒ Types::GetDataLakeSettingsResponse

The AWS Lake Formation principal.

Examples:

Request syntax with placeholder values


resp = client.get_data_lake_settings({
  catalog_id: "CatalogIdString",
})

Response structure


resp.data_lake_settings.data_lake_admins #=> Array
resp.data_lake_settings.data_lake_admins[0].data_lake_principal_identifier #=> String
resp.data_lake_settings.create_database_default_permissions #=> Array
resp.data_lake_settings.create_database_default_permissions[0].principal.data_lake_principal_identifier #=> String
resp.data_lake_settings.create_database_default_permissions[0].permissions #=> Array
resp.data_lake_settings.create_database_default_permissions[0].permissions[0] #=> String, one of "ALL", "SELECT", "ALTER", "DROP", "DELETE", "INSERT", "CREATE_DATABASE", "CREATE_TABLE", "DATA_LOCATION_ACCESS"
resp.data_lake_settings.create_table_default_permissions #=> Array
resp.data_lake_settings.create_table_default_permissions[0].principal.data_lake_principal_identifier #=> String
resp.data_lake_settings.create_table_default_permissions[0].permissions #=> Array
resp.data_lake_settings.create_table_default_permissions[0].permissions[0] #=> String, one of "ALL", "SELECT", "ALTER", "DROP", "DELETE", "INSERT", "CREATE_DATABASE", "CREATE_TABLE", "DATA_LOCATION_ACCESS"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :catalog_id (String)

    The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

Returns:

See Also:



529
530
531
532
# File 'gems/aws-sdk-lakeformation/lib/aws-sdk-lakeformation/client.rb', line 529

def get_data_lake_settings(params = {}, options = {})
  req = build_request(:get_data_lake_settings, params)
  req.send_request(options)
end

#get_effective_permissions_for_path(params = {}) ⇒ Types::GetEffectivePermissionsForPathResponse

Returns the permissions for a specified table or database resource located at a path in Amazon S3.

Examples:

Request syntax with placeholder values


resp = client.get_effective_permissions_for_path({
  catalog_id: "CatalogIdString",
  resource_arn: "ResourceArnString", # required
  next_token: "Token",
  max_results: 1,
})

Response structure


resp.permissions #=> Array
resp.permissions[0].principal.data_lake_principal_identifier #=> String
resp.permissions[0].resource.database.name #=> String
resp.permissions[0].resource.table.database_name #=> String
resp.permissions[0].resource.table.name #=> String
resp.permissions[0].resource.table_with_columns.database_name #=> String
resp.permissions[0].resource.table_with_columns.name #=> String
resp.permissions[0].resource.table_with_columns.column_names #=> Array
resp.permissions[0].resource.table_with_columns.column_names[0] #=> String
resp.permissions[0].resource.table_with_columns.column_wildcard.excluded_column_names #=> Array
resp.permissions[0].resource.table_with_columns.column_wildcard.excluded_column_names[0] #=> String
resp.permissions[0].resource.data_location.resource_arn #=> String
resp.permissions[0].permissions #=> Array
resp.permissions[0].permissions[0] #=> String, one of "ALL", "SELECT", "ALTER", "DROP", "DELETE", "INSERT", "CREATE_DATABASE", "CREATE_TABLE", "DATA_LOCATION_ACCESS"
resp.permissions[0].permissions_with_grant_option #=> Array
resp.permissions[0].permissions_with_grant_option[0] #=> String, one of "ALL", "SELECT", "ALTER", "DROP", "DELETE", "INSERT", "CREATE_DATABASE", "CREATE_TABLE", "DATA_LOCATION_ACCESS"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :catalog_id (String)

    The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource for which you want to get permissions.

  • :next_token (String)

    A continuation token, if this is not the first call to retrieve this list.

  • :max_results (Integer)

    The maximum number of results to return.

Returns:

See Also:



592
593
594
595
# File 'gems/aws-sdk-lakeformation/lib/aws-sdk-lakeformation/client.rb', line 592

def get_effective_permissions_for_path(params = {}, options = {})
  req = build_request(:get_effective_permissions_for_path, params)
  req.send_request(options)
end

#grant_permissions(params = {}) ⇒ Struct

Grants permissions to the principal to access metadata in the Data Catalog and data organized in underlying data storage such as Amazon S3.

For information about permissions, see Security and Access Control to Metadata and Data.

Examples:

Request syntax with placeholder values


resp = client.grant_permissions({
  catalog_id: "CatalogIdString",
  principal: { # required
    data_lake_principal_identifier: "DataLakePrincipalString",
  },
  resource: { # required
    catalog: {
    },
    database: {
      name: "NameString", # required
    },
    table: {
      database_name: "NameString", # required
      name: "NameString", # required
    },
    table_with_columns: {
      database_name: "NameString",
      name: "NameString",
      column_names: ["NameString"],
      column_wildcard: {
        excluded_column_names: ["NameString"],
      },
    },
    data_location: {
      resource_arn: "ResourceArnString", # required
    },
  },
  permissions: ["ALL"], # required, accepts ALL, SELECT, ALTER, DROP, DELETE, INSERT, CREATE_DATABASE, CREATE_TABLE, DATA_LOCATION_ACCESS
  permissions_with_grant_option: ["ALL"], # accepts ALL, SELECT, ALTER, DROP, DELETE, INSERT, CREATE_DATABASE, CREATE_TABLE, DATA_LOCATION_ACCESS
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :catalog_id (String)

    The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

  • :principal (required, Types::DataLakePrincipal)

    The principal to be granted the permissions on the resource. Supported principals are IAM users or IAM roles, and they are defined by their principal type and their ARN.

    Note that if you define a resource with a particular ARN, then later delete, and recreate a resource with that same ARN, the resource maintains the permissions already granted.

  • :resource (required, Types::Resource)

    The resource to which permissions are to be granted. Resources in AWS Lake Formation are the Data Catalog, databases, and tables.

  • :permissions (required, Array<String>)

    The permissions granted to the principal on the resource. AWS Lake Formation defines privileges to grant and revoke access to metadata in the Data Catalog and data organized in underlying data storage such as Amazon S3. AWS Lake Formation requires that each principal be authorized to perform a specific task on AWS Lake Formation resources.

  • :permissions_with_grant_option (Array<String>)

    Indicates a list of the granted permissions that the principal may pass to other users. These permissions may only be a subset of the permissions granted in the Privileges.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



678
679
680
681
# File 'gems/aws-sdk-lakeformation/lib/aws-sdk-lakeformation/client.rb', line 678

def grant_permissions(params = {}, options = {})
  req = build_request(:grant_permissions, params)
  req.send_request(options)
end

#list_permissions(params = {}) ⇒ Types::ListPermissionsResponse

Returns a list of the principal permissions on the resource, filtered by the permissions of the caller. For example, if you are granted an ALTER permission, you are able to see only the principal permissions for ALTER.

This operation returns only those permissions that have been explicitly granted.

For information about permissions, see Security and Access Control to Metadata and Data.

Examples:

Request syntax with placeholder values


resp = client.list_permissions({
  catalog_id: "CatalogIdString",
  principal: {
    data_lake_principal_identifier: "DataLakePrincipalString",
  },
  resource_type: "CATALOG", # accepts CATALOG, DATABASE, TABLE, DATA_LOCATION
  resource: {
    catalog: {
    },
    database: {
      name: "NameString", # required
    },
    table: {
      database_name: "NameString", # required
      name: "NameString", # required
    },
    table_with_columns: {
      database_name: "NameString",
      name: "NameString",
      column_names: ["NameString"],
      column_wildcard: {
        excluded_column_names: ["NameString"],
      },
    },
    data_location: {
      resource_arn: "ResourceArnString", # required
    },
  },
  next_token: "Token",
  max_results: 1,
})

Response structure


resp.principal_resource_permissions #=> Array
resp.principal_resource_permissions[0].principal.data_lake_principal_identifier #=> String
resp.principal_resource_permissions[0].resource.database.name #=> String
resp.principal_resource_permissions[0].resource.table.database_name #=> String
resp.principal_resource_permissions[0].resource.table.name #=> String
resp.principal_resource_permissions[0].resource.table_with_columns.database_name #=> String
resp.principal_resource_permissions[0].resource.table_with_columns.name #=> String
resp.principal_resource_permissions[0].resource.table_with_columns.column_names #=> Array
resp.principal_resource_permissions[0].resource.table_with_columns.column_names[0] #=> String
resp.principal_resource_permissions[0].resource.table_with_columns.column_wildcard.excluded_column_names #=> Array
resp.principal_resource_permissions[0].resource.table_with_columns.column_wildcard.excluded_column_names[0] #=> String
resp.principal_resource_permissions[0].resource.data_location.resource_arn #=> String
resp.principal_resource_permissions[0].permissions #=> Array
resp.principal_resource_permissions[0].permissions[0] #=> String, one of "ALL", "SELECT", "ALTER", "DROP", "DELETE", "INSERT", "CREATE_DATABASE", "CREATE_TABLE", "DATA_LOCATION_ACCESS"
resp.principal_resource_permissions[0].permissions_with_grant_option #=> Array
resp.principal_resource_permissions[0].permissions_with_grant_option[0] #=> String, one of "ALL", "SELECT", "ALTER", "DROP", "DELETE", "INSERT", "CREATE_DATABASE", "CREATE_TABLE", "DATA_LOCATION_ACCESS"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :catalog_id (String)

    The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

  • :principal (Types::DataLakePrincipal)

    Specifies a principal to filter the permissions returned.

  • :resource_type (String)

    Specifies a resource type to filter the permissions returned.

  • :resource (Types::Resource)

    A resource where you will get a list of the principal permissions.

    This operation does not support getting privileges on a table with columns. Instead, call this operation on the table, and the operation returns the table and the table w columns.

  • :next_token (String)

    A continuation token, if this is not the first call to retrieve this list.

  • :max_results (Integer)

    The maximum number of results to return.

Returns:

See Also:



787
788
789
790
# File 'gems/aws-sdk-lakeformation/lib/aws-sdk-lakeformation/client.rb', line 787

def list_permissions(params = {}, options = {})
  req = build_request(:list_permissions, params)
  req.send_request(options)
end

#list_resources(params = {}) ⇒ Types::ListResourcesResponse

Lists the resources registered to be managed by the Data Catalog.

Examples:

Request syntax with placeholder values


resp = client.list_resources({
  filter_condition_list: [
    {
      field: "RESOURCE_ARN", # accepts RESOURCE_ARN, ROLE_ARN, LAST_MODIFIED
      comparison_operator: "EQ", # accepts EQ, NE, LE, LT, GE, GT, CONTAINS, NOT_CONTAINS, BEGINS_WITH, IN, BETWEEN
      string_value_list: ["StringValue"],
    },
  ],
  max_results: 1,
  next_token: "Token",
})

Response structure


resp.resource_info_list #=> Array
resp.resource_info_list[0].resource_arn #=> String
resp.resource_info_list[0].role_arn #=> String
resp.resource_info_list[0].last_modified #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :filter_condition_list (Array<Types::FilterCondition>)

    Any applicable row-level and/or column-level filtering conditions for the resources.

  • :max_results (Integer)

    The maximum number of resource results.

  • :next_token (String)

    A continuation token, if this is not the first call to retrieve these resources.

Returns:

See Also:



836
837
838
839
# File 'gems/aws-sdk-lakeformation/lib/aws-sdk-lakeformation/client.rb', line 836

def list_resources(params = {}, options = {})
  req = build_request(:list_resources, params)
  req.send_request(options)
end

#put_data_lake_settings(params = {}) ⇒ Struct

The AWS Lake Formation principal.

Examples:

Request syntax with placeholder values


resp = client.put_data_lake_settings({
  catalog_id: "CatalogIdString",
  data_lake_settings: { # required
    data_lake_admins: [
      {
        data_lake_principal_identifier: "DataLakePrincipalString",
      },
    ],
    create_database_default_permissions: [
      {
        principal: {
          data_lake_principal_identifier: "DataLakePrincipalString",
        },
        permissions: ["ALL"], # accepts ALL, SELECT, ALTER, DROP, DELETE, INSERT, CREATE_DATABASE, CREATE_TABLE, DATA_LOCATION_ACCESS
      },
    ],
    create_table_default_permissions: [
      {
        principal: {
          data_lake_principal_identifier: "DataLakePrincipalString",
        },
        permissions: ["ALL"], # accepts ALL, SELECT, ALTER, DROP, DELETE, INSERT, CREATE_DATABASE, CREATE_TABLE, DATA_LOCATION_ACCESS
      },
    ],
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :catalog_id (String)

    The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

  • :data_lake_settings (required, Types::DataLakeSettings)

    A list of AWS Lake Formation principals.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



887
888
889
890
# File 'gems/aws-sdk-lakeformation/lib/aws-sdk-lakeformation/client.rb', line 887

def put_data_lake_settings(params = {}, options = {})
  req = build_request(:put_data_lake_settings, params)
  req.send_request(options)
end

#register_resource(params = {}) ⇒ Struct

Registers the resource as managed by the Data Catalog.

To add or update data, Lake Formation needs read/write access to the chosen Amazon S3 path. Choose a role that you know has permission to do this, or choose the AWSServiceRoleForLakeFormationDataAccess service-linked role. When you register the first Amazon S3 path, the service-linked role and a new inline policy are created on your behalf. Lake Formation adds the first path to the inline policy and attaches it to the service-linked role. When you register subsequent paths, Lake Formation adds the path to the existing policy.

Examples:

Request syntax with placeholder values


resp = client.register_resource({
  resource_arn: "ResourceArnString", # required
  use_service_linked_role: false,
  role_arn: "IAMRoleArn",
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource that you want to register.

  • :use_service_linked_role (Boolean)

    Designates a trusted caller, an IAM principal, by registering this caller with the Data Catalog.

  • :role_arn (String)

    The identifier for the role.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



928
929
930
931
# File 'gems/aws-sdk-lakeformation/lib/aws-sdk-lakeformation/client.rb', line 928

def register_resource(params = {}, options = {})
  req = build_request(:register_resource, params)
  req.send_request(options)
end

#revoke_permissions(params = {}) ⇒ Struct

Revokes permissions to the principal to access metadata in the Data Catalog and data organized in underlying data storage such as Amazon S3.

Examples:

Request syntax with placeholder values


resp = client.revoke_permissions({
  catalog_id: "CatalogIdString",
  principal: { # required
    data_lake_principal_identifier: "DataLakePrincipalString",
  },
  resource: { # required
    catalog: {
    },
    database: {
      name: "NameString", # required
    },
    table: {
      database_name: "NameString", # required
      name: "NameString", # required
    },
    table_with_columns: {
      database_name: "NameString",
      name: "NameString",
      column_names: ["NameString"],
      column_wildcard: {
        excluded_column_names: ["NameString"],
      },
    },
    data_location: {
      resource_arn: "ResourceArnString", # required
    },
  },
  permissions: ["ALL"], # required, accepts ALL, SELECT, ALTER, DROP, DELETE, INSERT, CREATE_DATABASE, CREATE_TABLE, DATA_LOCATION_ACCESS
  permissions_with_grant_option: ["ALL"], # accepts ALL, SELECT, ALTER, DROP, DELETE, INSERT, CREATE_DATABASE, CREATE_TABLE, DATA_LOCATION_ACCESS
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :catalog_id (String)

    The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

  • :principal (required, Types::DataLakePrincipal)

    The principal to be revoked permissions on the resource.

  • :resource (required, Types::Resource)

    The resource to which permissions are to be revoked.

  • :permissions (required, Array<String>)

    The permissions revoked to the principal on the resource. For information about permissions, see Security and Access Control to Metadata and Data.

  • :permissions_with_grant_option (Array<String>)

    Indicates a list of permissions for which to revoke the grant option allowing the principal to pass permissions to other principals.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1001
1002
1003
1004
# File 'gems/aws-sdk-lakeformation/lib/aws-sdk-lakeformation/client.rb', line 1001

def revoke_permissions(params = {}, options = {})
  req = build_request(:revoke_permissions, params)
  req.send_request(options)
end

#update_resource(params = {}) ⇒ Struct

Updates the data access role used for vending access to the given (registered) resource in AWS Lake Formation.

Examples:

Request syntax with placeholder values


resp = client.update_resource({
  role_arn: "IAMRoleArn", # required
  resource_arn: "ResourceArnString", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :role_arn (required, String)

    The new role to use for the given resource registered in AWS Lake Formation.

  • :resource_arn (required, String)

    The resource ARN.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1029
1030
1031
1032
# File 'gems/aws-sdk-lakeformation/lib/aws-sdk-lakeformation/client.rb', line 1029

def update_resource(params = {}, options = {})
  req = build_request(:update_resource, params)
  req.send_request(options)
end