LifecycleApi
All URIs are relative to https://s3.eu-central-3.ionoscloud.com
DeleteBucketLifecycle
var result = DeleteBucketLifecycle(ctx, bucket)
.Execute()DeleteBucketLifecycle
Example
package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go-s3"
)
func main() {
bucket := "bucket_example" // string |
configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LifecycleApi.DeleteBucketLifecycle(context.Background(), bucket).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LifecycleApi.DeleteBucketLifecycle``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
}
}Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
bucket
string
Other Parameters
Other parameters are passed through a pointer to an apiDeleteBucketLifecycleRequest struct via the builder pattern
Return type
(empty response body)
HTTP request headers
Content-Type: Not defined
Accept: application/xml
URLs Configuration per Operation
Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "LifecycleApiService.DeleteBucketLifecycle" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
ctx := context.WithValue(context.Background(), {packageName}.ContextOperationServerIndices, map[string]int{
"LifecycleApiService.DeleteBucketLifecycle": 2,
})
ctx = context.WithValue(context.Background(), {packageName}.ContextOperationServerVariables, map[string]map[string]string{
"LifecycleApiService.DeleteBucketLifecycle": {
"port": "8443",
},
})GetBucketLifecycle
var result GetBucketLifecycleOutput = GetBucketLifecycle(ctx, bucket)
.Execute()GetBucketLifecycle
Example
package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go-s3"
)
func main() {
bucket := "bucket_example" // string |
configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LifecycleApi.GetBucketLifecycle(context.Background(), bucket).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LifecycleApi.GetBucketLifecycle``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
}
// response from `GetBucketLifecycle`: GetBucketLifecycleOutput
fmt.Fprintf(os.Stdout, "Response from `LifecycleApi.GetBucketLifecycle`: %v\n", resource)
}Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
bucket
string
Other Parameters
Other parameters are passed through a pointer to an apiGetBucketLifecycleRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/xml
URLs Configuration per Operation
Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "LifecycleApiService.GetBucketLifecycle" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
ctx := context.WithValue(context.Background(), {packageName}.ContextOperationServerIndices, map[string]int{
"LifecycleApiService.GetBucketLifecycle": 2,
})
ctx = context.WithValue(context.Background(), {packageName}.ContextOperationServerVariables, map[string]map[string]string{
"LifecycleApiService.GetBucketLifecycle": {
"port": "8443",
},
})PutBucketLifecycle
var result = PutBucketLifecycle(ctx, bucket)
.ContentMD5(contentMD5)
.PutBucketLifecycleRequest(putBucketLifecycleRequest)
.Execute()PutBucketLifecycle
Example
package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go-s3"
)
func main() {
bucket := "bucket_example" // string |
contentMD5 := "contentMD5_example" // string |
putBucketLifecycleRequest := *openapiclient.NewPutBucketLifecycleRequest() // PutBucketLifecycleRequest |
configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LifecycleApi.PutBucketLifecycle(context.Background(), bucket).ContentMD5(contentMD5).PutBucketLifecycleRequest(putBucketLifecycleRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LifecycleApi.PutBucketLifecycle``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
}
}Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
bucket
string
Other Parameters
Other parameters are passed through a pointer to an apiPutBucketLifecycleRequest struct via the builder pattern
contentMD5
string
Return type
(empty response body)
HTTP request headers
Content-Type: application/xml
Accept: application/xml
URLs Configuration per Operation
Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "LifecycleApiService.PutBucketLifecycle" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
ctx := context.WithValue(context.Background(), {packageName}.ContextOperationServerIndices, map[string]int{
"LifecycleApiService.PutBucketLifecycle": 2,
})
ctx = context.WithValue(context.Background(), {packageName}.ContextOperationServerVariables, map[string]map[string]string{
"LifecycleApiService.PutBucketLifecycle": {
"port": "8443",
},
})Last updated