register_resource
¶
register_resource(
resource_arn: ResourceArnString,
*,
config_overrides: Optional[LakeFormationClientConfig] = 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/lake_formation.py
3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 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 | |