ObjectLockApi
Method
HTTP request
Description
GetObjectLegalHold
var result ObjectLegalHoldConfiguration = GetObjectLegalHold(ctx, bucket, key)
.VersionId(versionId)
.Execute()Example
package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go-s3"
)
func main() {
bucket := "bucket_example" // string |
key := "key_example" // string | The key name of the object whose Legal Hold status you want to retrieve.
versionId := "versionId_example" // string | The version ID of the object whose Legal Hold status you want to retrieve. (optional)
configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ObjectLockApi.GetObjectLegalHold(context.Background(), bucket, key).VersionId(versionId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ObjectLockApi.GetObjectLegalHold``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
}
// response from `GetObjectLegalHold`: ObjectLegalHoldConfiguration
fmt.Fprintf(os.Stdout, "Response from `ObjectLockApi.GetObjectLegalHold`: %v\n", resource)
}Path Parameters
Name
Type
Description
Notes
Other Parameters
Name
Type
Description
Notes
Return type
HTTP request headers
URLs Configuration per Operation
GetObjectLockConfiguration
Example
Path Parameters
Name
Type
Description
Notes
Other Parameters
Return type
HTTP request headers
URLs Configuration per Operation
GetObjectRetention
Example
Path Parameters
Name
Type
Description
Notes
Other Parameters
Name
Type
Description
Notes
Return type
HTTP request headers
URLs Configuration per Operation
PutObjectLegalHold
Example
Path Parameters
Name
Type
Description
Notes
Other Parameters
Name
Type
Description
Notes
Return type
HTTP request headers
URLs Configuration per Operation
PutObjectLockConfiguration
Example
Path Parameters
Name
Type
Description
Notes
Other Parameters
Name
Type
Description
Notes
Return type
HTTP request headers
URLs Configuration per Operation
PutObjectRetention
Example
Path Parameters
Name
Type
Description
Notes
Other Parameters
Name
Type
Description
Notes
Return type
HTTP request headers
URLs Configuration per Operation
Last updated