Navigation

  • index
  • modules |
  • next |
  • previous |
  • Boto3 Docs 1.26.93 documentation »
  • Available services »
  • S3 »
Boto3 Docs 1.26.93 documentation

Table Of Contents

  • Quickstart
  • A sample tutorial
  • Code examples
  • Developer guide
  • Security
  • Available services
    • AccessAnalyzer
    • Account
    • ACM
    • ACMPCA
    • AlexaForBusiness
    • PrometheusService
    • Amplify
    • AmplifyBackend
    • AmplifyUIBuilder
    • APIGateway
    • ApiGatewayManagementApi
    • ApiGatewayV2
    • AppConfig
    • AppConfigData
    • Appflow
    • AppIntegrationsService
    • ApplicationAutoScaling
    • ApplicationInsights
    • ApplicationCostProfiler
    • AppMesh
    • AppRunner
    • AppStream
    • AppSync
    • ARCZonalShift
    • Athena
    • AuditManager
    • AutoScaling
    • AutoScalingPlans
    • Backup
    • BackupGateway
    • BackupStorage
    • Batch
    • BillingConductor
    • Braket
    • Budgets
    • CostExplorer
    • Chime
    • ChimeSDKIdentity
    • ChimeSDKMediaPipelines
    • ChimeSDKMeetings
    • ChimeSDKMessaging
    • ChimeSDKVoice
    • CleanRoomsService
    • Cloud9
    • CloudControlApi
    • CloudDirectory
    • CloudFormation
    • CloudFront
    • CloudHSM
    • CloudHSMV2
    • CloudSearch
    • CloudSearchDomain
    • CloudTrail
    • CloudTrailDataService
    • CloudWatch
    • CodeArtifact
    • CodeBuild
    • CodeCatalyst
    • CodeCommit
    • CodeDeploy
    • CodeGuruReviewer
    • CodeGuruProfiler
    • CodePipeline
    • CodeStar
    • CodeStarconnections
    • CodeStarNotifications
    • CognitoIdentity
    • CognitoIdentityProvider
    • CognitoSync
    • Comprehend
    • ComprehendMedical
    • ComputeOptimizer
    • ConfigService
    • Connect
    • ConnectContactLens
    • ConnectCampaignService
    • ConnectCases
    • ConnectParticipant
    • ControlTower
    • CostandUsageReportService
    • CustomerProfiles
    • GlueDataBrew
    • DataExchange
    • DataPipeline
    • DataSync
    • DAX
    • Detective
    • DeviceFarm
    • DevOpsGuru
    • DirectConnect
    • ApplicationDiscoveryService
    • DLM
    • DatabaseMigrationService
    • DocDB
    • DocDBElastic
    • drs
    • DirectoryService
    • DynamoDB
    • DynamoDBStreams
    • EBS
    • EC2
    • EC2InstanceConnect
    • ECR
    • ECRPublic
    • ECS
    • EFS
    • EKS
    • ElasticInference
    • ElastiCache
    • ElasticBeanstalk
    • ElasticTranscoder
    • ElasticLoadBalancing
    • ElasticLoadBalancingv2
    • EMR
    • EMRContainers
    • EMRServerless
    • ElasticsearchService
    • EventBridge
    • CloudWatchEvidently
    • finspace
    • FinSpaceData
    • Firehose
    • FIS
    • FMS
    • ForecastService
    • ForecastQueryService
    • FraudDetector
    • FSx
    • GameLift
    • GameSparks
    • Glacier
    • GlobalAccelerator
    • Glue
    • ManagedGrafana
    • Greengrass
    • GreengrassV2
    • GroundStation
    • GuardDuty
    • Health
    • HealthLake
    • Honeycode
    • IAM
    • IdentityStore
    • imagebuilder
    • ImportExport
    • Inspector
    • Inspector2
    • CloudWatchInternetMonitor
    • IoT
    • IoTDataPlane
    • IoTJobsDataPlane
    • IoTRoboRunner
    • IoT1ClickDevicesService
    • IoT1ClickProjects
    • IoTAnalytics
    • IoTDeviceAdvisor
    • IoTEvents
    • IoTEventsData
    • IoTFleetHub
    • IoTFleetWise
    • IoTSecureTunneling
    • IoTSiteWise
    • IoTThingsGraph
    • IoTTwinMaker
    • IoTWireless
    • IVS
    • ivschat
    • Kafka
    • KafkaConnect
    • kendra
    • KendraRanking
    • Keyspaces
    • Kinesis
    • KinesisVideoArchivedMedia
    • KinesisVideoMedia
    • KinesisVideoSignalingChannels
    • KinesisVideoWebRTCStorage
    • KinesisAnalytics
    • KinesisAnalyticsV2
    • KinesisVideo
    • KMS
    • LakeFormation
    • Lambda
    • LexModelBuildingService
    • LexRuntimeService
    • LexModelsV2
    • LexRuntimeV2
    • LicenseManager
    • LicenseManagerLinuxSubscriptions
    • LicenseManagerUserSubscriptions
    • Lightsail
    • LocationService
    • CloudWatchLogs
    • LookoutEquipment
    • LookoutMetrics
    • LookoutforVision
    • MainframeModernization
    • MachineLearning
    • Macie
    • Macie2
    • ManagedBlockchain
    • MarketplaceCatalog
    • MarketplaceEntitlementService
    • MarketplaceCommerceAnalytics
    • MediaConnect
    • MediaConvert
    • MediaLive
    • MediaPackage
    • MediaPackageVod
    • MediaStore
    • MediaStoreData
    • MediaTailor
    • MemoryDB
    • MarketplaceMetering
    • MigrationHub
    • mgn
    • MigrationHubRefactorSpaces
    • MigrationHubConfig
    • MigrationHubOrchestrator
    • MigrationHubStrategyRecommendations
    • Mobile
    • MQ
    • MTurk
    • MWAA
    • Neptune
    • NetworkFirewall
    • NetworkManager
    • NimbleStudio
    • CloudWatchObservabilityAccessManager
    • Omics
    • OpenSearchService
    • OpenSearchServiceServerless
    • OpsWorks
    • OpsWorksCM
    • Organizations
    • Outposts
    • Panorama
    • Personalize
    • PersonalizeEvents
    • PersonalizeRuntime
    • PI
    • Pinpoint
    • PinpointEmail
    • PinpointSMSVoice
    • PinpointSMSVoiceV2
    • EventBridgePipes
    • Polly
    • Pricing
    • Private5G
    • Proton
    • QLDB
    • QLDBSession
    • QuickSight
    • RAM
    • RecycleBin
    • RDS
    • RDSDataService
    • Redshift
    • RedshiftDataAPIService
    • RedshiftServerless
    • Rekognition
    • ResilienceHub
    • ResourceExplorer
    • ResourceGroups
    • ResourceGroupsTaggingAPI
    • RoboMaker
    • IAMRolesAnywhere
    • Route53
    • Route53RecoveryCluster
    • Route53RecoveryControlConfig
    • Route53RecoveryReadiness
    • Route53Domains
    • Route53Resolver
    • CloudWatchRUM
    • S3
      • Client
      • Paginators
      • Waiters
      • Resources
      • Examples
    • S3Control
    • S3Outposts
    • SageMaker
    • AugmentedAIRuntime
    • SagemakerEdgeManager
    • SageMakerFeatureStoreRuntime
    • SageMakergeospatialcapabilities
    • SageMakerMetrics
    • SageMakerRuntime
    • SavingsPlans
    • EventBridgeScheduler
    • Schemas
    • SimpleDB
    • SecretsManager
    • SecurityHub
    • SecurityLake
    • ServerlessApplicationRepository
    • ServiceQuotas
    • ServiceCatalog
    • AppRegistry
    • ServiceDiscovery
    • SES
    • SESV2
    • Shield
    • signer
    • SimSpaceWeaver
    • SMS
    • PinpointSMSVoice
    • SnowDeviceManagement
    • Snowball
    • SNS
    • SQS
    • SSM
    • SSMContacts
    • SSMIncidents
    • SsmSap
    • SSO
    • SSOAdmin
    • SSOOIDC
    • SFN
    • StorageGateway
    • STS
    • Support
    • SupportApp
    • SWF
    • Synthetics
    • Textract
    • TimestreamQuery
    • TimestreamWrite
    • TelcoNetworkBuilder
    • TranscribeService
    • Transfer
    • Translate
    • VoiceID
    • WAF
    • WAFRegional
    • WAFV2
    • WellArchitected
    • ConnectWisdomService
    • WorkDocs
    • WorkLink
    • WorkMail
    • WorkMailMessageFlow
    • WorkSpaces
    • WorkSpacesWeb
    • XRay
  • Core references
  • Customization references
  1. Docs
  2. Available services
  3. S3
  4. get_object_legal_hold

get_object_legal_hold¶

S3.Client.get_object_legal_hold(**kwargs)¶

Gets an object's current legal hold status. For more information, see Locking Objects.

This action is not supported by Amazon S3 on Outposts.

The following action is related to GetObjectLegalHold :

  • GetObjectAttributes

See also: AWS API Documentation

Request Syntax

response = client.get_object_legal_hold(
    Bucket='string',
    Key='string',
    VersionId='string',
    RequestPayer='requester',
    ExpectedBucketOwner='string'
)
Parameters
  • Bucket (string) --

    [REQUIRED]

    The bucket name containing the object whose legal hold status you want to retrieve.

    When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName -AccountId .s3-accesspoint.*Region* .amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide .

  • Key (string) --

    [REQUIRED]

    The key name for the object whose legal hold status you want to retrieve.

  • VersionId (string) -- The version ID of the object whose legal hold status you want to retrieve.
  • RequestPayer (string) -- Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. For information about downloading objects from Requester Pays buckets, see Downloading Objects in Requester Pays Buckets in the Amazon S3 User Guide .
  • ExpectedBucketOwner (string) -- The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).
Return type

dict

Returns

Response Syntax

{
    'LegalHold': {
        'Status': 'ON'|'OFF'
    }
}

Response Structure

  • (dict) --

    • LegalHold (dict) --

      The current legal hold status for the specified object.

      • Status (string) --

        Indicates whether the specified object has a legal hold in place.

get_object_attributes
get_object_lock_configuration

Navigation

  • index
  • modules |
  • next |
  • previous |
  • Boto3 Docs 1.26.93 documentation »
  • Available services »
  • S3 »
Privacy | Site Terms | Cookie preferences | © Copyright 2023, Amazon Web Services, Inc. Created using Sphinx.