PolicyApi
All URIs are relative to https://s3.eu-central-1.ionoscloud.com
DeleteBucketPolicy
var result = DeleteBucketPolicy(ctx, bucket)
.Policy(policy)
.Execute()DeleteBucketPolicy
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 |
policy := true // bool |
configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := userobjectstorage.NewAPIClient(configuration)
resource, resp, err := apiClient.PolicyApi.DeleteBucketPolicy(context.Background(), bucket).Policy(policy).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PolicyApi.DeleteBucketPolicy``: %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 apiDeleteBucketPolicyRequest struct via the builder pattern
policy
bool
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 "PolicyApiService.DeleteBucketPolicy" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
GetBucketPolicy
GetBucketPolicy
Example
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 apiGetBucketPolicyRequest struct via the builder pattern
policy
bool
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/jsonapplication/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 "PolicyApiService.GetBucketPolicy" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
GetBucketPolicyStatus
GetBucketPolicyStatus
Example
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 apiGetBucketPolicyStatusRequest struct via the builder pattern
policyStatus
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 "PolicyApiService.GetBucketPolicyStatus" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
PutBucketPolicy
PutBucketPolicy
Example
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 apiPutBucketPolicyRequest struct via the builder pattern
Return type
(empty response body)
HTTP request headers
Content-Type: application/json
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 "PolicyApiService.PutBucketPolicy" string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
Last updated
