LoggingApi
All URIs are relative to https://s3.eu-central-1.ionoscloud.com
GetBucketLogging
var result GetBucketLogging200Response = GetBucketLogging(ctx, bucket)
.Logging(logging)
.Execute()GetBucketLogging
Example
package main
import (
"context"
"fmt"
"os"
userobjectstorage "github.com/ionos-cloud/sdk-go-bundle/userobjectstorage"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
func main() {
bucket := "bucket_example" // string | The bucket name for which to get the logging information.
logging := true // bool |
configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := userobjectstorage.NewAPIClient(configuration)
resource, resp, err := apiClient.LoggingApi.GetBucketLogging(context.Background(), bucket).Logging(logging).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingApi.GetBucketLogging``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
}
// response from `GetBucketLogging`: GetBucketLogging200Response
fmt.Fprintf(os.Stdout, "Response from `LoggingApi.GetBucketLogging`: %v\n", resource)
}Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
bucket
string
The bucket name for which to get the logging information.
Other Parameters
Other parameters are passed through a pointer to an apiGetBucketLoggingRequest struct via the builder pattern
logging
bool
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 "LoggingApiService.GetBucketLogging" 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(), shared.ContextOperationServerIndices, map[string]int{
"LoggingApiService.GetBucketLogging": 2,
})
ctx = context.WithValue(context.Background(), shared.ContextOperationServerVariables, map[string]map[string]string{
"LoggingApiService.GetBucketLogging": {
"port": "8443",
},
})PutBucketLogging
var result = PutBucketLogging(ctx, bucket)
.Logging(logging)
.PutBucketLoggingRequest(putBucketLoggingRequest)
.ContentMD5(contentMD5)
.Execute()PutBucketLogging
Example
package main
import (
"context"
"fmt"
"os"
userobjectstorage "github.com/ionos-cloud/sdk-go-bundle/userobjectstorage"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
func main() {
bucket := "bucket_example" // string | The name of the bucket for which to set the logging parameters.
logging := true // bool |
putBucketLoggingRequest := *openapiclient.NewPutBucketLoggingRequest(*openapiclient.NewPutBucketLoggingRequestBucketLoggingStatus()) // PutBucketLoggingRequest |
contentMD5 := TODO // string | (optional)
configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := userobjectstorage.NewAPIClient(configuration)
resource, resp, err := apiClient.LoggingApi.PutBucketLogging(context.Background(), bucket).Logging(logging).PutBucketLoggingRequest(putBucketLoggingRequest).ContentMD5(contentMD5).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingApi.PutBucketLogging``: %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
The name of the bucket for which to set the logging parameters.
Other Parameters
Other parameters are passed through a pointer to an apiPutBucketLoggingRequest struct via the builder pattern
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 "LoggingApiService.PutBucketLogging" 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(), shared.ContextOperationServerIndices, map[string]int{
"LoggingApiService.PutBucketLogging": 2,
})
ctx = context.WithValue(context.Background(), shared.ContextOperationServerVariables, map[string]map[string]string{
"LoggingApiService.PutBucketLogging": {
"port": "8443",
},
})Last updated
