1// Copyright (c) 2016, 2018, 2019, Oracle and/or its affiliates. All rights reserved. 2// Code generated. DO NOT EDIT. 3 4// Object Storage Service API 5// 6// Common set of Object Storage and Archive Storage APIs for managing buckets, objects, and related resources. 7// 8 9package objectstorage 10 11import ( 12 "github.com/oracle/oci-go-sdk/common" 13) 14 15// PreauthenticatedRequest Pre-authenticated requests provide a way to let users access a bucket or an object without having their own credentials. 16// When you create a pre-authenticated request, a unique URL is generated. Users in your organization, partners, or third 17// parties can use this URL to access the targets identified in the pre-authenticated request. 18// See Using Pre-Authenticated Requests (https://docs.cloud.oracle.com/Content/Object/Tasks/usingpreauthenticatedrequests.htm). 19// To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, talk to an 20// administrator. If you are an administrator who needs to write policies to give users access, see 21// Getting Started with Policies (https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm). 22type PreauthenticatedRequest struct { 23 24 // The unique identifier to use when directly addressing the pre-authenticated request. 25 Id *string `mandatory:"true" json:"id"` 26 27 // The user-provided name of the pre-authenticated request. 28 Name *string `mandatory:"true" json:"name"` 29 30 // The URI to embed in the URL when using the pre-authenticated request. 31 AccessUri *string `mandatory:"true" json:"accessUri"` 32 33 // The operation that can be performed on this resource. 34 AccessType PreauthenticatedRequestAccessTypeEnum `mandatory:"true" json:"accessType"` 35 36 // The expiration date for the pre-authenticated request as per RFC 3339 (https://tools.ietf.org/rfc/rfc3339). After 37 // this date the pre-authenticated request will no longer be valid. 38 TimeExpires *common.SDKTime `mandatory:"true" json:"timeExpires"` 39 40 // The date when the pre-authenticated request was created as per specification 41 // RFC 3339 (https://tools.ietf.org/rfc/rfc3339). 42 TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` 43 44 // The name of the object that is being granted access to by the pre-authenticated request. Avoid entering confidential 45 // information. The object name can be null and if so, the pre-authenticated request grants access to the entire bucket. 46 ObjectName *string `mandatory:"false" json:"objectName"` 47} 48 49func (m PreauthenticatedRequest) String() string { 50 return common.PointerString(m) 51} 52 53// PreauthenticatedRequestAccessTypeEnum Enum with underlying type: string 54type PreauthenticatedRequestAccessTypeEnum string 55 56// Set of constants representing the allowable values for PreauthenticatedRequestAccessTypeEnum 57const ( 58 PreauthenticatedRequestAccessTypeObjectread PreauthenticatedRequestAccessTypeEnum = "ObjectRead" 59 PreauthenticatedRequestAccessTypeObjectwrite PreauthenticatedRequestAccessTypeEnum = "ObjectWrite" 60 PreauthenticatedRequestAccessTypeObjectreadwrite PreauthenticatedRequestAccessTypeEnum = "ObjectReadWrite" 61 PreauthenticatedRequestAccessTypeAnyobjectwrite PreauthenticatedRequestAccessTypeEnum = "AnyObjectWrite" 62) 63 64var mappingPreauthenticatedRequestAccessType = map[string]PreauthenticatedRequestAccessTypeEnum{ 65 "ObjectRead": PreauthenticatedRequestAccessTypeObjectread, 66 "ObjectWrite": PreauthenticatedRequestAccessTypeObjectwrite, 67 "ObjectReadWrite": PreauthenticatedRequestAccessTypeObjectreadwrite, 68 "AnyObjectWrite": PreauthenticatedRequestAccessTypeAnyobjectwrite, 69} 70 71// GetPreauthenticatedRequestAccessTypeEnumValues Enumerates the set of values for PreauthenticatedRequestAccessTypeEnum 72func GetPreauthenticatedRequestAccessTypeEnumValues() []PreauthenticatedRequestAccessTypeEnum { 73 values := make([]PreauthenticatedRequestAccessTypeEnum, 0) 74 for _, v := range mappingPreauthenticatedRequestAccessType { 75 values = append(values, v) 76 } 77 return values 78} 79