Soto icon

Soto

LakeFormation

Service object for interacting with AWS LakeFormation service.

public struct LakeFormation: AWSService
AWS Lake Formation

Defines the public endpoint for the AWS Lake Formation service.

Inheritance

AWSService

Initializers

init(client:region:partition:endpoint:timeout:byteBufferAllocator:options:)

Initialize the LakeFormation client

public init(client: AWSClient, region: SotoCore.Region? = nil, partition: AWSPartition = .aws, endpoint: String? = nil, timeout: TimeAmount? = nil, byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(), options: AWSServiceConfig.Options = [])

Parameters

  • client: AWSClient used to process requests
  • region: Region of server you want to communicate with. This will override the partition parameter.
  • partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
  • endpoint: Custom endpoint URL to use instead of standard AWS servers
  • timeout: Timeout value for HTTP requests

init(from:patch:)

Initializer required by AWSService.with(middlewares:​timeout:​byteBufferAllocator:​options). You are not able to use this initializer directly as there are no public initializers for AWSServiceConfig.Patch. Please use AWSService.with(middlewares:​timeout:​byteBufferAllocator:​options) instead.

public init(from: LakeFormation, patch: AWSServiceConfig.Patch)

Properties

client

Client used for communication with AWS

let client: AWSClient

config

Service configuration

let config: AWSServiceConfig

Methods

batchGrantPermissions(_:logger:on:)

public func batchGrantPermissions(_ input: BatchGrantPermissionsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<BatchGrantPermissionsResponse>

Batch operation to grant permissions to the principal.

batchRevokePermissions(_:logger:on:)

public func batchRevokePermissions(_ input: BatchRevokePermissionsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<BatchRevokePermissionsResponse>

Batch operation to revoke permissions from the principal.

deregisterResource(_:logger:on:)

public func deregisterResource(_ input: DeregisterResourceRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<DeregisterResourceResponse>

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.

describeResource(_:logger:on:)

public func describeResource(_ input: DescribeResourceRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<DescribeResourceResponse>

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

getDataLakeSettings(_:logger:on:)

public func getDataLakeSettings(_ input: GetDataLakeSettingsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<GetDataLakeSettingsResponse>

Retrieves the list of the data lake administrators of a Lake Formation-managed data lake.

getEffectivePermissionsForPath(_:logger:on:)

public func getEffectivePermissionsForPath(_ input: GetEffectivePermissionsForPathRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<GetEffectivePermissionsForPathResponse>

Returns the Lake Formation permissions for a specified table or database resource located at a path in Amazon S3. GetEffectivePermissionsForPath will not return databases and tables if the catalog is encrypted.

grantPermissions(_:logger:on:)

public func grantPermissions(_ input: GrantPermissionsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<GrantPermissionsResponse>

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.

listPermissions(_:logger:on:)

public func listPermissions(_ input: ListPermissionsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<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.

listResources(_:logger:on:)

public func listResources(_ input: ListResourcesRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<ListResourcesResponse>

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

putDataLakeSettings(_:logger:on:)

public func putDataLakeSettings(_ input: PutDataLakeSettingsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<PutDataLakeSettingsResponse>

Sets the list of data lake administrators who have admin privileges on all resources managed by Lake Formation. For more information on admin privileges, see Granting Lake Formation Permissions.

This API replaces the current list of data lake admins with the new list being passed. To add an admin, fetch the current list and add the new admin to that list and pass that list in this API.

registerResource(_:logger:on:)

public func registerResource(_ input: RegisterResourceRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<RegisterResourceResponse>

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.

The following request registers a new location and gives AWS Lake Formation permission to use the service-linked role to access that location.

ResourceArn = arn:aws:s3:::my-bucket UseServiceLinkedRole = true

If UseServiceLinkedRole is not set to true, you must provide or set the RoleArn:

arn:aws:iam::12345:role/my-data-access-role

revokePermissions(_:logger:on:)

public func revokePermissions(_ input: RevokePermissionsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<RevokePermissionsResponse>

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

updateResource(_:logger:on:)

public func updateResource(_ input: UpdateResourceRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<UpdateResourceResponse>

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

getEffectivePermissionsForPathPaginator(_:_:logger:on:onPage:)

public func getEffectivePermissionsForPathPaginator<Result>(_ input: GetEffectivePermissionsForPathRequest, _ initialValue: Result, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil, onPage: @escaping (Result, GetEffectivePermissionsForPathResponse, EventLoop) -> EventLoopFuture<(Bool, Result)>) -> EventLoopFuture<Result>

Returns the Lake Formation permissions for a specified table or database resource located at a path in Amazon S3. GetEffectivePermissionsForPath will not return databases and tables if the catalog is encrypted.

Provide paginated results to closure onPage for it to combine them into one result. This works in a similar manner to Array.reduce<Result>(_:_:) -> Result.

Parameters:

  • input: Input for request
  • initialValue: The value to use as the initial accumulating value. initialValue is passed to onPage the first time it is called.
  • logger: Logger used flot logging
  • eventLoop: EventLoop to run this process on
  • onPage: closure called with each paginated response. It combines an accumulating result with the contents of response. This combined result is then returned along with a boolean indicating if the paginate operation should continue.

getEffectivePermissionsForPathPaginator(_:logger:on:onPage:)

Provide paginated results to closure onPage.

public func getEffectivePermissionsForPathPaginator(_ input: GetEffectivePermissionsForPathRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil, onPage: @escaping (GetEffectivePermissionsForPathResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>

Parameters

  • input: Input for request
  • logger: Logger used flot logging
  • eventLoop: EventLoop to run this process on
  • onPage: closure called with each block of entries. Returns boolean indicating whether we should continue.

listPermissionsPaginator(_:_:logger:on:onPage:)

public func listPermissionsPaginator<Result>(_ input: ListPermissionsRequest, _ initialValue: Result, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil, onPage: @escaping (Result, ListPermissionsResponse, EventLoop) -> EventLoopFuture<(Bool, Result)>) -> EventLoopFuture<Result>

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.

Provide paginated results to closure onPage for it to combine them into one result. This works in a similar manner to Array.reduce<Result>(_:_:) -> Result.

Parameters:

  • input: Input for request
  • initialValue: The value to use as the initial accumulating value. initialValue is passed to onPage the first time it is called.
  • logger: Logger used flot logging
  • eventLoop: EventLoop to run this process on
  • onPage: closure called with each paginated response. It combines an accumulating result with the contents of response. This combined result is then returned along with a boolean indicating if the paginate operation should continue.

listPermissionsPaginator(_:logger:on:onPage:)

Provide paginated results to closure onPage.

public func listPermissionsPaginator(_ input: ListPermissionsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil, onPage: @escaping (ListPermissionsResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>

Parameters

  • input: Input for request
  • logger: Logger used flot logging
  • eventLoop: EventLoop to run this process on
  • onPage: closure called with each block of entries. Returns boolean indicating whether we should continue.

listResourcesPaginator(_:_:logger:on:onPage:)

public func listResourcesPaginator<Result>(_ input: ListResourcesRequest, _ initialValue: Result, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil, onPage: @escaping (Result, ListResourcesResponse, EventLoop) -> EventLoopFuture<(Bool, Result)>) -> EventLoopFuture<Result>

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

Provide paginated results to closure onPage for it to combine them into one result. This works in a similar manner to Array.reduce<Result>(_:_:) -> Result.

Parameters:

  • input: Input for request
  • initialValue: The value to use as the initial accumulating value. initialValue is passed to onPage the first time it is called.
  • logger: Logger used flot logging
  • eventLoop: EventLoop to run this process on
  • onPage: closure called with each paginated response. It combines an accumulating result with the contents of response. This combined result is then returned along with a boolean indicating if the paginate operation should continue.

listResourcesPaginator(_:logger:on:onPage:)

Provide paginated results to closure onPage.

public func listResourcesPaginator(_ input: ListResourcesRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil, onPage: @escaping (ListResourcesResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>

Parameters

  • input: Input for request
  • logger: Logger used flot logging
  • eventLoop: EventLoop to run this process on
  • onPage: closure called with each block of entries. Returns boolean indicating whether we should continue.