Documentation ¶
Index ¶
- Constants
- func BucketACLCreateResourceID(region scw.Region, bucket, acl string) string
- func DataSourceBucket() *schema.Resource
- func DataSourceBucketPolicy() *schema.Resource
- func DataSourceObjectBucketPolicyRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics
- func DataSourceObjectStorageRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics
- func ErrCodeEquals(err error, codes ...string) bool
- func ErrorCheck(t *testing.T, endpointIDs ...string) resource.ErrorCheckFunc
- func ExpandObjectBucketTags(tags interface{}) []*s3.Tag
- func IsS3Err(err error, code string, message string) bool
- func NewS3ClientFromMeta(meta *meta.Meta, region string) (*s3.S3, error)
- func NormalizeOwnerID(id *string) *string
- func ResourceBucket() *schema.Resource
- func ResourceBucketACL() *schema.Resource
- func ResourceBucketPolicy() *schema.Resource
- func ResourceBucketWebsiteConfiguration() *schema.Resource
- func ResourceLockConfiguration() *schema.Resource
- func ResourceObject() *schema.Resource
- func SecondJSONUnlessEquivalent(old, newP string) (string, error)
- func SharedS3ClientForRegion(region scw.Region) (*s3.S3, error)
- func SuppressEquivalentPolicyDiffs(k, old, newP string, _ *schema.ResourceData) bool
- func TimedOut(err error) bool
- func TransitionSCWStorageClassValues() []string
- func WebsiteDomainURL(region string) string
- type S3Website
- type ServiceErrorCheckFunc
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 ¶
BucketACLCreateResourceID is a method for creating an ID string with the bucket name and optional organizationID and/or ACL.
func DataSourceBucket ¶
func DataSourceBucketPolicy ¶
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 ¶
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 IsS3Err ¶
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 NormalizeOwnerID ¶ added in v2.40.0
func ResourceBucket ¶
func ResourceBucketACL ¶
func ResourceBucketPolicy ¶
func ResourceObject ¶
func SharedS3ClientForRegion ¶
SharedS3ClientForRegion returns a common S3 client needed for the sweeper
func SuppressEquivalentPolicyDiffs ¶
func SuppressEquivalentPolicyDiffs(k, old, newP string, _ *schema.ResourceData) bool
func TimedOut ¶
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 ¶
Types ¶
type ServiceErrorCheckFunc ¶
type ServiceErrorCheckFunc func(*testing.T) resource.ErrorCheckFunc
Source Files ¶
Click to show internal directories.
Click to hide internal directories.