object

package
v2.41.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2024 License: MPL-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrCodeNoSuchTagSet tag(s) not found
	ErrCodeNoSuchTagSet = "NoSuchTagSet"
	// ErrCodeNoSuchCORSConfiguration CORS configuration not found
	ErrCodeNoSuchCORSConfiguration = "NoSuchCORSConfiguration"
	// ErrCodeNoSuchLifecycleConfiguration lifecycle configuration rule not found
	ErrCodeNoSuchLifecycleConfiguration = "NoSuchLifecycleConfiguration"
	// ErrCodeAccessDenied action on resource is denied
	ErrCodeAccessDenied = "AccessDenied"
	// ErrCodeBucketNotEmpty bucket is not empty
	ErrCodeBucketNotEmpty = "BucketNotEmpty"
	// ErrCodeNoSuchBucketPolicy policy not found
	ErrCodeNoSuchBucketPolicy = "NoSuchBucketPolicy"
	// ErrCodeNoSuchWebsiteConfiguration website configuration not found
	ErrCodeNoSuchWebsiteConfiguration = "NoSuchWebsiteConfiguration"
	// ErrCodeObjectLockConfigurationNotFoundError object lock configuration not found
	ErrCodeObjectLockConfigurationNotFoundError = "ObjectLockConfigurationNotFoundError"
	// ErrCodeAuthorizationError authorization error
	ErrCodeAuthorizationError = "AuthorizationError"
	// ErrCodeInternalException internal exception
	ErrCodeInternalException = "InternalException"
	// ErrCodeInternalServiceError internal exception error
	ErrCodeInternalServiceError = "InternalServiceError"
	// ErrCodeInvalidAction invalid action
	ErrCodeInvalidAction = "InvalidAction"
	// ErrCodeInvalidParameterException invalid parameter exception
	ErrCodeInvalidParameterException = "InvalidParameterException"
	// ErrCodeInvalidParameterValue invalid parameter value
	ErrCodeInvalidParameterValue = "InvalidParameterValue"
	// ErrCodeInvalidRequest invalid request
	ErrCodeInvalidRequest = "InvalidRequest"
	// ErrCodeOperationDisabledException operation disabled exception
	ErrCodeOperationDisabledException = "OperationDisabledException"
	// ErrCodeOperationNotPermitted operation not permitted
	ErrCodeOperationNotPermitted = "OperationNotPermitted"
	// ErrCodeUnknownOperationException   unknown operation exception
	ErrCodeUnknownOperationException = "UnknownOperationException"
	// ErrCodeUnsupportedFeatureException = unsupported Feature exception
	ErrCodeUnsupportedFeatureException = "UnsupportedFeatureException"
	// ErrCodeUnsupportedOperation unsupported operation
	ErrCodeUnsupportedOperation = "UnsupportedOperation"
	// ErrCodeValidationError validation error
	ErrCodeValidationError = "ValidationError"
	// ErrCodeValidationException validation exception
	ErrCodeValidationException = "ValidationException"
)
View Source
const (
	// TransitionStorageClassStandard is a TransitionStorageClass enum value
	TransitionStorageClassStandard = "STANDARD"

	// TransitionStorageClassGlacier is a TransitionStorageClass enum value
	TransitionStorageClassGlacier = "GLACIER"

	// TransitionStorageClassOnezoneIa is a TransitionStorageClass enum value
	TransitionStorageClassOnezoneIa = "ONEZONE_IA"
)
View Source
const (
	BucketACLSeparator = "/"
)
View Source
const (
	ErrCodeForbidden = "Forbidden"
)

Variables

This section is empty.

Functions

func BucketACLCreateResourceID

func BucketACLCreateResourceID(region scw.Region, bucket, acl string) string

BucketACLCreateResourceID is a method for creating an ID string with the bucket name and optional organizationID and/or ACL.

func DataSourceBucket

func DataSourceBucket() *schema.Resource

func DataSourceBucketPolicy

func DataSourceBucketPolicy() *schema.Resource

func DataSourceObjectBucketPolicyRead

func DataSourceObjectBucketPolicyRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics

func DataSourceObjectStorageRead

func DataSourceObjectStorageRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics

func ErrCodeEquals

func ErrCodeEquals(err error, codes ...string) bool

ErrCodeEquals returns true if the error matches all these conditions:

  • err is of type scw.Error
  • Error.Error() equals one of the passed codes

func ErrorCheck

func ErrorCheck(t *testing.T, endpointIDs ...string) resource.ErrorCheckFunc

func ExpandObjectBucketTags

func ExpandObjectBucketTags(tags interface{}) []*s3.Tag

func IsS3Err

func IsS3Err(err error, code string, message string) bool

IsS3Err returns true if the error matches all these conditions:

  • err is of type aws err.Error
  • Error.Code() matches code
  • Error.Message() contains message

func NewS3ClientFromMeta

func NewS3ClientFromMeta(meta *meta.Meta, region string) (*s3.S3, error)

func NormalizeOwnerID added in v2.40.0

func NormalizeOwnerID(id *string) *string

func ResourceBucket

func ResourceBucket() *schema.Resource

func ResourceBucketACL

func ResourceBucketACL() *schema.Resource

func ResourceBucketPolicy

func ResourceBucketPolicy() *schema.Resource

func ResourceBucketWebsiteConfiguration

func ResourceBucketWebsiteConfiguration() *schema.Resource

func ResourceLockConfiguration

func ResourceLockConfiguration() *schema.Resource

func ResourceObject

func ResourceObject() *schema.Resource

func SecondJSONUnlessEquivalent

func SecondJSONUnlessEquivalent(old, newP string) (string, error)

func SharedS3ClientForRegion

func SharedS3ClientForRegion(region scw.Region) (*s3.S3, error)

SharedS3ClientForRegion returns a common S3 client needed for the sweeper

func SuppressEquivalentPolicyDiffs

func SuppressEquivalentPolicyDiffs(k, old, newP string, _ *schema.ResourceData) bool

func TimedOut

func TimedOut(err error) bool

TimedOut returns true if the error represents a "wait timed out" condition. Specifically, TimedOut returns true if the error matches all these conditions:

  • err is of type resource.TimeoutError
  • TimeoutError.LastError is nil

func TransitionSCWStorageClassValues

func TransitionSCWStorageClassValues() []string

TransitionSCWStorageClassValues returns all elements of the TransitionStorageClass enum supported by scaleway

func WebsiteDomainURL

func WebsiteDomainURL(region string) string

Types

type S3Website

type S3Website struct {
	Endpoint, Domain string
}

func WebsiteEndpoint

func WebsiteEndpoint(bucket string, region scw.Region) *S3Website

type ServiceErrorCheckFunc

type ServiceErrorCheckFunc func(*testing.T) resource.ErrorCheckFunc

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL