Documentation ¶
Overview ¶
Package resourceconfigurationv1 : Operations and models for the ResourceConfigurationV1 service
Index ¶
- Constants
- type ActivityTracking
- type Bucket
- type Firewall
- type GetBucketConfigOptions
- type MetricsMonitoring
- type ResourceConfigurationV1
- func (resourceConfiguration *ResourceConfigurationV1) GetBucketConfig(getBucketConfigOptions *GetBucketConfigOptions) (result *Bucket, response *core.DetailedResponse, err error)
- func (_ *ResourceConfigurationV1) NewGetBucketConfigOptions(bucket string) *GetBucketConfigOptions
- func (_ *ResourceConfigurationV1) NewUpdateBucketConfigOptions(bucket string) *UpdateBucketConfigOptions
- func (resourceConfiguration *ResourceConfigurationV1) SetServiceURL(url string) error
- func (resourceConfiguration *ResourceConfigurationV1) UpdateBucketConfig(updateBucketConfigOptions *UpdateBucketConfigOptions) (response *core.DetailedResponse, err error)
- type ResourceConfigurationV1Options
- type UpdateBucketConfigOptions
- func (options *UpdateBucketConfigOptions) SetActivityTracking(activityTracking *ActivityTracking) *UpdateBucketConfigOptions
- func (options *UpdateBucketConfigOptions) SetBucket(bucket string) *UpdateBucketConfigOptions
- func (options *UpdateBucketConfigOptions) SetFirewall(firewall *Firewall) *UpdateBucketConfigOptions
- func (options *UpdateBucketConfigOptions) SetHardQuota(hardQuota int64) *UpdateBucketConfigOptions
- func (options *UpdateBucketConfigOptions) SetHeaders(param map[string]string) *UpdateBucketConfigOptions
- func (options *UpdateBucketConfigOptions) SetIfMatch(ifMatch string) *UpdateBucketConfigOptions
- func (options *UpdateBucketConfigOptions) SetMetricsMonitoring(metricsMonitoring *MetricsMonitoring) *UpdateBucketConfigOptions
Constants ¶
const DefaultServiceName = "resource_configuration"
DefaultServiceName is the default key used to find external configuration information.
const DefaultServiceURL = "https://config.cloud-object-storage.cloud.ibm.com/v1"
DefaultServiceURL is the default URL to make service requests to.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityTracking ¶
type ActivityTracking struct { // If set to `true`, all object read events (i.e. downloads) will be sent to Activity Tracker. ReadDataEvents *bool `json:"read_data_events,omitempty"` // If set to `true`, all object write events (i.e. uploads) will be sent to Activity Tracker. WriteDataEvents *bool `json:"write_data_events,omitempty"` // Required the first time `activity_tracking` is configured. The instance of Activity Tracker that will receive object // event data. The format is "crn:v1:bluemix:public:logdnaat:{bucket location}:a/{storage account}:{activity tracker // service instance}::". ActivityTrackerCrn *string `json:"activity_tracker_crn,omitempty"` }
ActivityTracking : Enables sending log data to Activity Tracker and LogDNA to provide visibility into object read and write events. All object events are sent to the activity tracker instance defined in the `activity_tracker_crn` field.
type Bucket ¶
type Bucket struct { // The name of the bucket. Non-mutable. Name *string `json:"name,omitempty"` // The service instance that holds the bucket. Non-mutable. Crn *string `json:"crn,omitempty"` // The service instance that holds the bucket. Non-mutable. ServiceInstanceID *string `json:"service_instance_id,omitempty"` // The service instance that holds the bucket. Non-mutable. ServiceInstanceCrn *string `json:"service_instance_crn,omitempty"` // The creation time of the bucket in RFC 3339 format. Non-mutable. TimeCreated *strfmt.DateTime `json:"time_created,omitempty"` // The modification time of the bucket in RFC 3339 format. Non-mutable. TimeUpdated *strfmt.DateTime `json:"time_updated,omitempty"` // Total number of objects in the bucket. Non-mutable. ObjectCount *int64 `json:"object_count,omitempty"` // Total size of all objects in the bucket. Non-mutable. BytesUsed *int64 `json:"bytes_used,omitempty"` // Number of non-current object versions in the bucket. Non-mutable. NoncurrentObjectCount *int64 `json:"noncurrent_object_count,omitempty"` // Total size of all non-current object versions in the bucket. Non-mutable. NoncurrentBytesUsed *int64 `json:"noncurrent_bytes_used,omitempty"` // Total number of delete markers in the bucket. Non-mutable. DeleteMarkerCount *int64 `json:"delete_marker_count,omitempty"` // Maximum bytes for this bucket. HardQuota *int64 `json:"hard_quota,omitempty"` // An access control mechanism based on the network (IP address) where request originated. Requests not originating // from IP addresses listed in the `allowed_ip` field will be denied regardless of any access policies (including // public access) that might otherwise permit the request. Viewing or updating the `Firewall` element requires the // requester to have the `manager` role. Firewall *Firewall `json:"firewall,omitempty"` // Enables sending log data to Activity Tracker and LogDNA to provide visibility into object read and write events. All // object events are sent to the activity tracker instance defined in the `activity_tracker_crn` field. ActivityTracking *ActivityTracking `json:"activity_tracking,omitempty"` // Enables sending metrics to IBM Cloud Monitoring. All metrics are sent to the IBM Cloud Monitoring instance defined // in the `monitoring_crn` field. MetricsMonitoring *MetricsMonitoring `json:"metrics_monitoring,omitempty"` }
Bucket : A bucket.
type Firewall ¶
type Firewall struct { // List of IPv4 or IPv6 addresses in CIDR notation to be affected by firewall in CIDR notation is supported. Passing an // empty array will lift the IP address filter. The `allowed_ip` array can contain a maximum of 1000 items. AllowedIp []string `json:"allowed_ip"` }
Firewall : An access control mechanism based on the network (IP address) where request originated. Requests not originating from IP addresses listed in the `allowed_ip` field will be denied regardless of any access policies (including public access) that might otherwise permit the request. Viewing or updating the `Firewall` element requires the requester to have the `manager` role.
type GetBucketConfigOptions ¶
type GetBucketConfigOptions struct { // Name of a bucket. Bucket *string `json:"bucket" validate:"required"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
GetBucketConfigOptions : The GetBucketConfig options.
func (*GetBucketConfigOptions) SetBucket ¶
func (options *GetBucketConfigOptions) SetBucket(bucket string) *GetBucketConfigOptions
SetBucket : Allow user to set Bucket
func (*GetBucketConfigOptions) SetHeaders ¶
func (options *GetBucketConfigOptions) SetHeaders(param map[string]string) *GetBucketConfigOptions
SetHeaders : Allow user to set Headers
type MetricsMonitoring ¶
type MetricsMonitoring struct { // If set to `true`, all usage metrics (i.e. `bytes_used`) will be sent to the monitoring service. UsageMetricsEnabled *bool `json:"usage_metrics_enabled,omitempty"` // If set to `true`, all request metrics (i.e. `rest.object.head`) will be sent to the monitoring service. RequestMetricsEnabled *bool `json:"request_metrics_enabled,omitempty"` // Required the first time `metrics_monitoring` is configured. The instance of IBM Cloud Monitoring that will receive // the bucket metrics. The format is "crn:v1:bluemix:public:logdnaat:{bucket location}:a/{storage account}:{monitoring // service instance}::". MetricsMonitoringCrn *string `json:"metrics_monitoring_crn,omitempty"` }
MetricsMonitoring : Enables sending metrics to IBM Cloud Monitoring. All metrics are sent to the IBM Cloud Monitoring instance defined in the `monitoring_crn` field.
type ResourceConfigurationV1 ¶
type ResourceConfigurationV1 struct {
Service *core.BaseService
}
ResourceConfigurationV1 : REST API used to configure Cloud Object Storage buckets. This version of the API only supports reading bucket metadata and setting IP access controls.
Version: 1.0.0
func NewResourceConfigurationV1 ¶
func NewResourceConfigurationV1(options *ResourceConfigurationV1Options) (service *ResourceConfigurationV1, err error)
NewResourceConfigurationV1 : constructs an instance of ResourceConfigurationV1 with passed in options.
func NewResourceConfigurationV1UsingExternalConfig ¶
func NewResourceConfigurationV1UsingExternalConfig(options *ResourceConfigurationV1Options) (resourceConfiguration *ResourceConfigurationV1, err error)
NewResourceConfigurationV1UsingExternalConfig : constructs an instance of ResourceConfigurationV1 with passed in options and external configuration.
func (*ResourceConfigurationV1) GetBucketConfig ¶
func (resourceConfiguration *ResourceConfigurationV1) GetBucketConfig(getBucketConfigOptions *GetBucketConfigOptions) (result *Bucket, response *core.DetailedResponse, err error)
GetBucketConfig : Returns metadata for the specified bucket Returns metadata for the specified bucket.
func (*ResourceConfigurationV1) NewGetBucketConfigOptions ¶
func (_ *ResourceConfigurationV1) NewGetBucketConfigOptions(bucket string) *GetBucketConfigOptions
NewGetBucketConfigOptions : Instantiate GetBucketConfigOptions
func (*ResourceConfigurationV1) NewUpdateBucketConfigOptions ¶
func (_ *ResourceConfigurationV1) NewUpdateBucketConfigOptions(bucket string) *UpdateBucketConfigOptions
NewUpdateBucketConfigOptions : Instantiate UpdateBucketConfigOptions
func (*ResourceConfigurationV1) SetServiceURL ¶
func (resourceConfiguration *ResourceConfigurationV1) SetServiceURL(url string) error
SetServiceURL sets the service URL
func (*ResourceConfigurationV1) UpdateBucketConfig ¶
func (resourceConfiguration *ResourceConfigurationV1) UpdateBucketConfig(updateBucketConfigOptions *UpdateBucketConfigOptions) (response *core.DetailedResponse, err error)
UpdateBucketConfig : Make changes to a bucket's configuration Updates a bucket using [JSON Merge Patch](https://tools.ietf.org/html/rfc7396). This request is used to add functionality (like an IP access filter) or to update existing parameters. **Primitives are overwritten and replaced in their entirety. It is not possible to append a new (or to delete a specific) value to an array.** Arrays can be cleared by updating the parameter with an empty array `[]`. Only updates specified mutable fields. Please don't use `PATCH` trying to update the number of objects in a bucket, any timestamps, or other non-mutable fields.
type ResourceConfigurationV1Options ¶
type ResourceConfigurationV1Options struct { ServiceName string URL string Authenticator core.Authenticator }
ResourceConfigurationV1Options : Service options
type UpdateBucketConfigOptions ¶
type UpdateBucketConfigOptions struct { // Name of a bucket. Bucket *string `json:"bucket" validate:"required"` // An access control mechanism based on the network (IP address) where request originated. Requests not originating // from IP addresses listed in the `allowed_ip` field will be denied regardless of any access policies (including // public access) that might otherwise permit the request. Viewing or updating the `Firewall` element requires the // requester to have the `manager` role. Firewall *Firewall `json:"firewall,omitempty"` // Enables sending log data to Activity Tracker and LogDNA to provide visibility into object read and write events. All // object events are sent to the activity tracker instance defined in the `activity_tracker_crn` field. ActivityTracking *ActivityTracking `json:"activity_tracking,omitempty"` // Enables sending metrics to IBM Cloud Monitoring. All metrics are sent to the IBM Cloud Monitoring instance defined // in the `monitoring_crn` field. MetricsMonitoring *MetricsMonitoring `json:"metrics_monitoring,omitempty"` // Maximum bytes for this bucket. HardQuota *int64 `json:"hard_quota,omitempty"` // An Etag previously returned in a header when fetching or updating a bucket's metadata. If this value does not match // the active Etag, the request will fail. IfMatch *string `json:"if-match,omitempty"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
UpdateBucketConfigOptions : The UpdateBucketConfig options.
func (*UpdateBucketConfigOptions) SetActivityTracking ¶
func (options *UpdateBucketConfigOptions) SetActivityTracking(activityTracking *ActivityTracking) *UpdateBucketConfigOptions
SetActivityTracking : Allow user to set ActivityTracking
func (*UpdateBucketConfigOptions) SetBucket ¶
func (options *UpdateBucketConfigOptions) SetBucket(bucket string) *UpdateBucketConfigOptions
SetBucket : Allow user to set Bucket
func (*UpdateBucketConfigOptions) SetFirewall ¶
func (options *UpdateBucketConfigOptions) SetFirewall(firewall *Firewall) *UpdateBucketConfigOptions
SetFirewall : Allow user to set Firewall
func (*UpdateBucketConfigOptions) SetHardQuota ¶ added in v1.2.0
func (options *UpdateBucketConfigOptions) SetHardQuota(hardQuota int64) *UpdateBucketConfigOptions
SetHardQuota : Allow user to set HardQuota
func (*UpdateBucketConfigOptions) SetHeaders ¶
func (options *UpdateBucketConfigOptions) SetHeaders(param map[string]string) *UpdateBucketConfigOptions
SetHeaders : Allow user to set Headers
func (*UpdateBucketConfigOptions) SetIfMatch ¶
func (options *UpdateBucketConfigOptions) SetIfMatch(ifMatch string) *UpdateBucketConfigOptions
SetIfMatch : Allow user to set IfMatch
func (*UpdateBucketConfigOptions) SetMetricsMonitoring ¶
func (options *UpdateBucketConfigOptions) SetMetricsMonitoring(metricsMonitoring *MetricsMonitoring) *UpdateBucketConfigOptions
SetMetricsMonitoring : Allow user to set MetricsMonitoring