register_resource
async
¶
register_resource(
resource_arn: ResourceArnString,
*,
config_overrides: Optional[AsyncLakeFormationClientConfig] = None,
use_service_linked_role: Optional[NullableBoolean] = None,
role_arn: Optional[IAMRoleArn] = None,
with_federation: Optional[NullableBoolean] = None,
hybrid_access_enabled: Optional[NullableBoolean] = None,
with_privileged_access: Optional[Boolean] = None,
expected_resource_owner_account: Optional[AccountIdString] = None,
) -> RegisterResourceResponse
Registers the resource as managed by the Data Catalog.
To add or update data, Lake Formation needs read/write access to the chosen data location. 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 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
Parameters:
-
resource_arn(ResourceArnString) –The Amazon Resource Name (ARN) of the resource that you want to register.
-
use_service_linked_role(Optional[NullableBoolean], default:None) –Designates an Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog. A service-linked role is a unique type of IAM role that is linked directly to Lake Formation.
For more information, see Using Service-Linked Roles for Lake Formation.
-
role_arn(Optional[IAMRoleArn], default:None) –The identifier for the role that registers the resource.
-
with_federation(Optional[NullableBoolean], default:None) –Whether or not the resource is a federated resource.
-
hybrid_access_enabled(Optional[NullableBoolean], default:None) –Specifies whether the data access of tables pointing to the location can be managed by both Lake Formation permissions as well as Amazon S3 bucket policies.
-
with_privileged_access(Optional[Boolean], default:None) –Grants the calling principal the permissions to perform all supported Lake Formation operations on the registered data location.
-
expected_resource_owner_account(Optional[AccountIdString], default:None) –The Amazon Web Services account that owns the Glue tables associated with specific Amazon S3 locations.
Raises:
-
AccessDeniedException–Access to a resource was denied.
-
AlreadyExistsException–A resource to be created or added already exists.
-
EntityNotFoundException–A specified entity does not exist.
-
InternalServiceException–An internal service error occurred.
-
InvalidInputException–The input provided was not valid.
-
OperationTimeoutException–The operation timed out.
-
ResourceNumberLimitExceededException–A resource numerical limit was exceeded.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_lakeformation/_services/async_lake_formation.py
3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 | |