ociidentity

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 41 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

OCI Identity

Parity grade: B · SDK github.com/oracle/oci-go-sdk/v65@v65.126.2 · last audited 2026-10-25 (0d22fe6b7)

Coverage

Metric Value
PARITY entries audited 97 (69 ok, 28 partial)
Feature families 6 (5 ok, 1 partial)
Known gaps 7
Deferred items 0
Resource leaks unknown
Known gaps
  • IAM policy enforcement is not implemented: policies and dynamic groups are stored and validated but never evaluated, so no request is authorised or denied by them; any verified principal may call any operation.
  • Identity domains (domains, SCIM-style users, MFA devices, OAuth2 client credentials, DB credentials, Swift passwords), ListIdentityProviderGroups and ResetIdpScimClient (the emulator has no identity provider group directory or SCIM server; SAML metadata carries no groups), standard tag templates (ListStandardTagNamespaces, GetStandardTagTemplate, ImportStandardTags: the SDK has only the shapes, not the template catalogue) and the IAM work request operations (/iamWorkRequests: every operation type in oci-go-sdk identity/iam_work_request.go is an identity-domain operation, so none can exist without domains) are not implemented. Tag retire and reactivate are not separate SDK operations: they are isRetired on UpdateTag and UpdateTagNamespace (identity_client.go).
  • Customer secret keys, SMTP credentials and the UI password are stored but not used: they do not authenticate S3-compatible, SMTP or console requests. Auth tokens authenticate OCI Container Registry logins only.
  • DeleteCompartment consults Object Storage, DNS and Streaming only; resources the other emulated OCI services (Core, Database, Functions, Load Balancer, Events, Logging, NoSQL, File Storage, Queue, Vault, API Gateway, Container Engine and Instances, Artifacts, Notifications, Monitoring, MySQL) keep in a compartment do not block deletion.
  • Statement subjects and locations are parsed but group, dynamic-group and compartment names are not resolved against existing resources, and variable and resource-type names are not checked against the documented lists (the OCI documentation reachable here does not say whether unknown names are rejected, so they are accepted).
  • Access levels are not modelled: accessLevel is validated but every caller sees every compartment, and inactive states other than DELETING and DELETED are never produced.
  • Resource principals and instance principals are not applied and only API-key signatures are verified.

More

Documentation

Index

Constants

View Source
const (
	// Region is the home region of the emulated tenancy.
	Region = "us-ashburn-1"
	// TenancyID is the OCID of the emulated tenancy; it is also the root compartment id.
	TenancyID = "ocid1.tenancy.oc1..aaaaaaaagopherstackemulatedtenancy000000000000000000000000"
)
View Source
const DefaultPort = 8153

DefaultPort is the dedicated listener's default TCP port.

Variables

View Source
var ErrGrammar = errors.New("syntax error")

ErrGrammar marks a policy statement or matching rule that violates the documented grammar.

View Source
var ErrNilAppContext = errors.New("ociidentity: nil app context")

ErrNilAppContext is returned when Init is called with a nil AppContext.

View Source
var ErrSnapshotNull = errors.New("ociidentity: null entry in snapshot")

ErrSnapshotNull is returned when a snapshot contains a null entry.

Functions

func ValidateMatchingRule

func ValidateMatchingRule(rule string) error

ValidateMatchingRule checks a dynamic group rule: `ANY|ALL {condition, ...}`.

func ValidateStatement

func ValidateStatement(stmt string) error

ValidateStatement checks one policy statement against the documented grammar (Allow, Deny, Define, Endorse and Admit).

Types

type APIError

type APIError struct {
	Code    string
	Message string
	Status  int
}

APIError is an OCI error response: HTTP status plus the `code` and `message` body fields.

func (*APIError) Error

func (e *APIError) Error() string

type APIKey

type APIKey struct {
	TimeCreated time.Time `json:"timeCreated"`
	Fingerprint string    `json:"fingerprint"`
	PEM         string    `json:"pem"`
}

APIKey is an uploaded RSA public key.

type AuthPolicy

type AuthPolicy struct {
	Etag             string         `json:"etag"`
	NetworkSourceIDs []string       `json:"networkSourceIds"`
	Password         PasswordPolicy `json:"passwordPolicy"`
}

AuthPolicy is the stored authentication policy.

type AuthPolicyWire

type AuthPolicyWire struct {
	CompartmentID  string            `json:"compartmentId"`
	NetworkPolicy  NetworkPolicyWire `json:"networkPolicy"`
	PasswordPolicy PasswordPolicy    `json:"passwordPolicy"`
}

AuthPolicyWire is the authentication policy wire shape.

type BulkEditOpIn

type BulkEditOpIn struct {
	DefinedTags   map[string]map[string]any `json:"definedTags"`
	OperationType string                    `json:"operationType"`
}

BulkEditOpIn is an operation in a BulkEditTags body.

type BulkEditResourceIn

type BulkEditResourceIn struct {
	Metadata     map[string]string `json:"metadata"`
	ID           string            `json:"id"`
	ResourceType string            `json:"resourceType"`
}

BulkEditResourceIn is a resource in a BulkEditTags body.

type BulkEditTagsIn

type BulkEditTagsIn struct {
	RetryToken    string               `json:"-"`
	CompartmentID string               `json:"compartmentId"`
	Resources     []BulkEditResourceIn `json:"resources"`
	Operations    []BulkEditOpIn       `json:"bulkEditOperations"`
}

BulkEditTagsIn is the BulkEditTags request body.

type BulkError

type BulkError struct {
	At      time.Time `json:"at"`
	Code    string    `json:"code"`
	Message string    `json:"message"`
}

BulkError is one failed target.

type BulkJob

type BulkJob struct {
	Ops     []BulkOp     `json:"ops,omitempty"`
	Targets []BulkTarget `json:"targets"`
	Results []BulkResult `json:"results"`
	Errors  []BulkError  `json:"errors"`
	Applied bool         `json:"applied"`
}

BulkJob is the persisted work of a bulk tag work request.

type BulkOp

type BulkOp struct {
	DefinedTags map[string]map[string]any `json:"definedTags"`
	Type        string                    `json:"type"`
}

BulkOp is one bulk edit operation.

type BulkResult

type BulkResult struct {
	ID         string `json:"id"`
	EntityType string `json:"entityType"`
	Action     string `json:"action"`
}

BulkResult is the outcome for one target.

type BulkTarget

type BulkTarget struct {
	Metadata     map[string]string `json:"metadata,omitempty"`
	ID           string            `json:"id"`
	ResourceType string            `json:"resourceType"`
}

BulkTarget is a resource a bulk work request acts on.

type Capabilities

type Capabilities struct {
	CanUseConsolePassword         bool `json:"canUseConsolePassword"`
	CanUseAPIKeys                 bool `json:"canUseApiKeys"`
	CanUseAuthTokens              bool `json:"canUseAuthTokens"`
	CanUseSMTPCredentials         bool `json:"canUseSmtpCredentials"`
	CanUseCustomerSecretKeys      bool `json:"canUseCustomerSecretKeys"`
	CanUseOAuth2ClientCredentials bool `json:"canUseOAuth2ClientCredentials"`
	CanUseDBCredentials           bool `json:"canUseDbCredentials"`
}

Capabilities are the per-user credential switches.

type Compartment

type Compartment struct {
	Meta
	Internal Internal `json:"internal"`
}

Compartment is a stored compartment.

type CompartmentFilter

type CompartmentFilter struct {
	CompartmentID string
	AccessLevel   string
	Name          string
	State         string
	Subtree       bool
}

CompartmentFilter holds the ListCompartments query.

type CompartmentUsage

type CompartmentUsage func(compartmentID string) string

CompartmentUsage names a resource another service still holds in a compartment, or returns "".

type ConfigProvider

type ConfigProvider interface {
	GetOCIIdentitySettings() Settings
}

ConfigProvider extracts OCI Identity configuration from the AppContext Config.

type CreateCompartmentIn

type CreateCompartmentIn struct {
	RetryToken string `json:"-"`
	Tags
	CompartmentID string `json:"compartmentId"`
	Name          string `json:"name"`
	Description   string `json:"description"`
}

CreateCompartmentIn is the CreateCompartment request body.

type CreateDynamicGroupIn

type CreateDynamicGroupIn struct {
	RetryToken string `json:"-"`
	Tags
	CompartmentID string `json:"compartmentId"`
	Name          string `json:"name"`
	Description   string `json:"description"`
	MatchingRule  string `json:"matchingRule"`
}

CreateDynamicGroupIn is the CreateDynamicGroup request body.

type CreateGroupIn

type CreateGroupIn struct {
	RetryToken string `json:"-"`
	Tags
	CompartmentID string `json:"compartmentId"`
	Name          string `json:"name"`
	Description   string `json:"description"`
}

CreateGroupIn is the CreateGroup request body.

type CreateIDPIn

type CreateIDPIn struct {
	RetryToken string `json:"-"`
	Tags
	FreeformAttributes map[string]string `json:"freeformAttributes"`
	Protocol           string            `json:"protocol"`
	CompartmentID      string            `json:"compartmentId"`
	Name               string            `json:"name"`
	Description        string            `json:"description"`
	ProductType        string            `json:"productType"`
	MetadataURL        string            `json:"metadataUrl"`
	Metadata           string            `json:"metadata"`
}

CreateIDPIn is the CreateIdentityProvider request body.

type CreateNetworkSourceIn

type CreateNetworkSourceIn struct {
	RetryToken string `json:"-"`
	Tags
	CompartmentID     string          `json:"compartmentId"`
	Name              string          `json:"name"`
	Description       string          `json:"description"`
	PublicSourceList  []string        `json:"publicSourceList"`
	VirtualSourceList []VirtualSource `json:"virtualSourceList"`
	Services          []string        `json:"services"`
}

CreateNetworkSourceIn is the CreateNetworkSource request body.

type CreatePolicyIn

type CreatePolicyIn struct {
	RetryToken string `json:"-"`
	Tags
	VersionDate   *string  `json:"versionDate"`
	CompartmentID string   `json:"compartmentId"`
	Name          string   `json:"name"`
	Description   string   `json:"description"`
	Statements    []string `json:"statements"`
}

CreatePolicyIn is the CreatePolicy request body.

type CreateTagDefaultIn

type CreateTagDefaultIn struct {
	RetryToken      string `json:"-"`
	IsRequired      *bool  `json:"isRequired"`
	CompartmentID   string `json:"compartmentId"`
	TagDefinitionID string `json:"tagDefinitionId"`
	Value           string `json:"value"`
}

CreateTagDefaultIn is the CreateTagDefault request body.

type CreateTagIn

type CreateTagIn struct {
	RetryToken     string         `json:"-"`
	Validator      map[string]any `json:"validator"`
	IsCostTracking *bool          `json:"isCostTracking"`
	Tags
	Name        string `json:"name"`
	Description string `json:"description"`
}

CreateTagIn is the CreateTag request body.

type CreateTagNamespaceIn

type CreateTagNamespaceIn struct {
	RetryToken string `json:"-"`
	Tags
	CompartmentID string `json:"compartmentId"`
	Name          string `json:"name"`
	Description   string `json:"description"`
}

CreateTagNamespaceIn is the CreateTagNamespace request body.

type CreateUserIn

type CreateUserIn struct {
	RetryToken string `json:"-"`
	Tags
	CompartmentID string `json:"compartmentId"`
	Name          string `json:"name"`
	Description   string `json:"description"`
	Email         string `json:"email"`
}

CreateUserIn is the CreateUser request body.

type Credential

type Credential struct {
	TimeCreated time.Time `json:"timeCreated"`
	ID          string    `json:"id"`
	Text        string    `json:"text"`
	Username    string    `json:"username,omitempty"`
	Salt        string    `json:"salt,omitempty"`
	Digest      string    `json:"digest,omitempty"`
	Secret      string    `json:"secret,omitempty"`
}

Credential is an auth token, secret key or SMTP credential. Only customer secret keys keep their secret (HMAC needs it); the others keep a salted digest.

type DynamicGroup

type DynamicGroup struct {
	Meta
	MatchingRule string   `json:"matchingRule"`
	Internal     Internal `json:"internal"`
}

DynamicGroup is a stored dynamic group.

type Group

type Group struct {
	Meta
	Internal Internal `json:"internal"`
}

Group is a stored IAM group.

type Handler

type Handler struct {
	Backend *InMemoryBackend

	Port        int
	EnforceAuth bool
	// contains filtered or unexported fields
}

Handler serves OCI Identity (IAM API 20160918): tenancy, compartments, principals, policies, credentials, tags.

func NewHandler

func NewHandler(backend *InMemoryBackend) *Handler

NewHandler creates a Handler; callers override Port and EnforceAuth from Settings.

func (*Handler) ExtractOperation

func (h *Handler) ExtractOperation(c *echo.Context) string

ExtractOperation returns the operation name for metrics.

func (*Handler) ExtractResource

func (h *Handler) ExtractResource(c *echo.Context) string

ExtractResource returns the addressed resource id for metrics.

func (*Handler) GetSupportedOperations

func (h *Handler) GetSupportedOperations() []string

GetSupportedOperations lists the supported operations.

func (*Handler) Handler

func (h *Handler) Handler() echo.HandlerFunc

Handler returns the Echo handler for all OCI Identity requests.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority is irrelevant because RouteMatcher never matches.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears all in-memory state.

func (*Handler) Restore

func (h *Handler) Restore(ctx context.Context, data []byte) error

Restore implements persistence.Persistable by delegating to the backend.

func (*Handler) RouteMatcher

func (h *Handler) RouteMatcher() service.Matcher

RouteMatcher never matches: OCI Identity runs on its own listener.

func (*Handler) Shutdown

func (h *Handler) Shutdown(ctx context.Context)

Shutdown stops the listener and the sweeper.

func (*Handler) Snapshot

func (h *Handler) Snapshot(ctx context.Context) []byte

Snapshot implements persistence.Persistable by delegating to the backend.

func (*Handler) StartWorker

func (h *Handler) StartWorker(ctx context.Context) error

StartWorker binds the dedicated listener synchronously so a port conflict is returned to the caller.

type IdentityProvider

type IdentityProvider struct {
	Meta
	ProductType        string            `json:"productType"`
	MetadataURL        string            `json:"metadataUrl"`
	Metadata           string            `json:"metadata"`
	SigningCertificate string            `json:"signingCertificate"`
	RedirectURL        string            `json:"redirectUrl"`
	FreeformAttributes map[string]string `json:"freeformAttributes"`
	Internal           Internal          `json:"internal"`
}

IdentityProvider is a stored SAML2 identity provider.

type IdentityProviderWire

type IdentityProviderWire struct {
	FreeformAttributes map[string]string `json:"freeformAttributes"`
	Meta
	Protocol           string `json:"protocol"`
	ProductType        string `json:"productType"`
	MetadataURL        string `json:"metadataUrl"`
	Metadata           string `json:"metadata"`
	SigningCertificate string `json:"signingCertificate"`
	RedirectURL        string `json:"redirectUrl"`
}

IdentityProviderWire is the SAML2 identity provider wire shape.

type IdpGroupMapping

type IdpGroupMapping struct {
	TimeCreated   time.Time `json:"timeCreated"`
	ID            string    `json:"id"`
	IdpID         string    `json:"idpId"`
	IdpGroupName  string    `json:"idpGroupName"`
	GroupID       string    `json:"groupId"`
	CompartmentID string    `json:"compartmentId"`
	Etag          string    `json:"etag"`
	Seq           int64     `json:"seq"`
}

IdpGroupMapping maps an identity provider group to an IAM group.

type IdpGroupMappingWire

type IdpGroupMappingWire struct {
	TimeCreated    time.Time `json:"timeCreated"`
	ID             string    `json:"id"`
	IdpID          string    `json:"idpId"`
	IdpGroupName   string    `json:"idpGroupName"`
	GroupID        string    `json:"groupId"`
	CompartmentID  string    `json:"compartmentId"`
	LifecycleState string    `json:"lifecycleState"`
}

IdpGroupMappingWire is the mapping wire shape.

type InMemoryBackend

type InMemoryBackend struct {

	// Auth is the API-key registry shared with the other OCI services.
	Auth *ociauth.Registry
	// contains filtered or unexported fields
}

InMemoryBackend holds all IAM state under one lock.

func NewInMemoryBackend

func NewInMemoryBackend() *InMemoryBackend

NewInMemoryBackend creates an empty backend.

func (*InMemoryBackend) AddCompartmentUsage

func (b *InMemoryBackend) AddCompartmentUsage(fn CompartmentUsage)

AddCompartmentUsage registers a service whose resources block compartment deletion.

func (*InMemoryBackend) AddUserToGroup

func (b *InMemoryBackend) AddUserToGroup(userID, groupID string) (membershipWire, string, error)

AddUserToGroup creates a membership.

func (*InMemoryBackend) BulkDeleteTags

func (b *InMemoryBackend) BulkDeleteTags(ids []string, token string) (string, error)

BulkDeleteTags accepts an asynchronous deletion of tag definitions.

func (*InMemoryBackend) BulkEditTags

func (b *InMemoryBackend) BulkEditTags(in BulkEditTagsIn) (string, error)

BulkEditTags accepts an asynchronous edit of the defined tags of several resources.

func (*InMemoryBackend) CascadeDeleteTagNamespace

func (b *InMemoryBackend) CascadeDeleteTagNamespace(id, ifMatch, token string) (string, error)

CascadeDeleteTagNamespace deletes a retired namespace together with every tag definition in it.

func (*InMemoryBackend) ChangeTagNamespaceCompartment

func (b *InMemoryBackend) ChangeTagNamespaceCompartment(id, compartment, token string) error

ChangeTagNamespaceCompartment moves a tag namespace and its tag definitions to another compartment.

func (*InMemoryBackend) CompartmentActive

func (b *InMemoryBackend) CompartmentActive(id string) bool

CompartmentActive reports whether id is the tenancy or an ACTIVE compartment.

func (*InMemoryBackend) CompartmentName

func (b *InMemoryBackend) CompartmentName(id string) string

CompartmentName returns the name of the tenancy or a known compartment, empty when id is unknown.

func (*InMemoryBackend) CompartmentWithin

func (b *InMemoryBackend) CompartmentWithin(id, ancestor string) bool

CompartmentWithin reports whether id equals ancestor or is nested below it; the tenancy contains everything.

func (*InMemoryBackend) CreateCompartment

func (b *InMemoryBackend) CreateCompartment(in CreateCompartmentIn) (compartmentWire, string, error)

CreateCompartment creates a compartment under the tenancy or another compartment.

func (*InMemoryBackend) CreateDynamicGroup

func (b *InMemoryBackend) CreateDynamicGroup(in CreateDynamicGroupIn) (dynamicGroupWire, string, error)

CreateDynamicGroup creates a dynamic group after validating its matching rule.

func (*InMemoryBackend) CreateGroup

func (b *InMemoryBackend) CreateGroup(in CreateGroupIn) (Meta, string, error)

CreateGroup creates an IAM group.

func (*InMemoryBackend) CreateIdentityProvider

func (b *InMemoryBackend) CreateIdentityProvider(in CreateIDPIn) (IdentityProviderWire, string, error)

CreateIdentityProvider creates a SAML2 identity provider from its metadata document.

func (*InMemoryBackend) CreateIdpGroupMapping

func (b *InMemoryBackend) CreateIdpGroupMapping(
	idpID, group, groupID, token string,
) (IdpGroupMappingWire, string, error)

CreateIdpGroupMapping maps an identity provider group to an existing IAM group.

func (*InMemoryBackend) CreateNetworkSource

func (b *InMemoryBackend) CreateNetworkSource(in CreateNetworkSourceIn) (NetworkSourceWire, string, error)

CreateNetworkSource creates a network source.

func (*InMemoryBackend) CreatePolicy

func (b *InMemoryBackend) CreatePolicy(in CreatePolicyIn) (policyWire, string, error)

CreatePolicy creates a policy after validating every statement.

func (*InMemoryBackend) CreateRegionSubscription

func (b *InMemoryBackend) CreateRegionSubscription(tenancy, key, token string) (regionSubWire, error)

CreateRegionSubscription subscribes the tenancy to another region; it is IN_PROGRESS for the transition window.

func (*InMemoryBackend) CreateTag

func (b *InMemoryBackend) CreateTag(nsID string, in CreateTagIn) (tagWire, string, error)

CreateTag creates a tag definition in a namespace.

func (*InMemoryBackend) CreateTagDefault

func (b *InMemoryBackend) CreateTagDefault(in CreateTagDefaultIn) (tagDefaultWire, string, error)

CreateTagDefault creates a default value for a tag in a compartment.

func (*InMemoryBackend) CreateTagNamespace

func (b *InMemoryBackend) CreateTagNamespace(in CreateTagNamespaceIn) (tagNamespaceWire, string, error)

CreateTagNamespace creates a tag namespace.

func (*InMemoryBackend) CreateUser

func (b *InMemoryBackend) CreateUser(in CreateUserIn) (userWire, string, error)

CreateUser creates an IAM user.

func (*InMemoryBackend) CustomerSecretKey

func (b *InMemoryBackend) CustomerSecretKey(accessKey string) (string, string, bool)

CustomerSecretKey returns the owner and secret of a customer secret key by its access key id.

func (*InMemoryBackend) DeleteAPIKey

func (b *InMemoryBackend) DeleteAPIKey(userID, fingerprint string) error

DeleteAPIKey removes a key and stops verifying signatures made with it.

func (*InMemoryBackend) DeleteCompartment

func (b *InMemoryBackend) DeleteCompartment(id, ifMatch string) (string, error)

DeleteCompartment starts the asynchronous deletion of an empty compartment and returns the work request id.

func (*InMemoryBackend) DeleteCredential

func (b *InMemoryBackend) DeleteCredential(userID, id string, kind credKind) error

DeleteCredential removes a credential.

func (*InMemoryBackend) DeleteDynamicGroup

func (b *InMemoryBackend) DeleteDynamicGroup(id, ifMatch string) error

DeleteDynamicGroup removes a dynamic group.

func (*InMemoryBackend) DeleteGroup

func (b *InMemoryBackend) DeleteGroup(id, ifMatch string) error

DeleteGroup removes an empty group.

func (*InMemoryBackend) DeleteIdentityProvider

func (b *InMemoryBackend) DeleteIdentityProvider(id, ifMatch string) error

DeleteIdentityProvider deletes an identity provider and its group mappings.

func (*InMemoryBackend) DeleteIdpGroupMapping

func (b *InMemoryBackend) DeleteIdpGroupMapping(idpID, id, ifMatch string) error

DeleteIdpGroupMapping deletes a mapping.

func (*InMemoryBackend) DeleteNetworkSource

func (b *InMemoryBackend) DeleteNetworkSource(id, ifMatch string) error

DeleteNetworkSource deletes a network source the authentication policy does not reference.

func (*InMemoryBackend) DeletePolicy

func (b *InMemoryBackend) DeletePolicy(id, ifMatch string) error

DeletePolicy removes a policy.

func (*InMemoryBackend) DeleteTag

func (b *InMemoryBackend) DeleteTag(nsID, name, ifMatch string) (string, error)

DeleteTag starts the asynchronous deletion of a tag definition and its defaults.

func (*InMemoryBackend) DeleteTagDefault

func (b *InMemoryBackend) DeleteTagDefault(id string) error

DeleteTagDefault removes a tag default.

func (*InMemoryBackend) DeleteTagNamespace

func (b *InMemoryBackend) DeleteTagNamespace(id, ifMatch string) error

DeleteTagNamespace removes a namespace that holds no tag definitions.

func (*InMemoryBackend) DeleteUser

func (b *InMemoryBackend) DeleteUser(id, ifMatch string) error

DeleteUser removes a user that belongs to no group, along with its credentials.

func (*InMemoryBackend) GetAuthenticationPolicy

func (b *InMemoryBackend) GetAuthenticationPolicy(compartment string) (AuthPolicyWire, string, error)

GetAuthenticationPolicy returns the tenancy authentication policy.

func (*InMemoryBackend) GetCompartment

func (b *InMemoryBackend) GetCompartment(id string) (compartmentWire, string, error)

GetCompartment returns one compartment (the tenancy id addresses the root compartment).

func (*InMemoryBackend) GetDynamicGroup

func (b *InMemoryBackend) GetDynamicGroup(id string) (dynamicGroupWire, string, error)

GetDynamicGroup returns one dynamic group.

func (*InMemoryBackend) GetGroup

func (b *InMemoryBackend) GetGroup(id string) (Meta, string, error)

GetGroup returns one group.

func (*InMemoryBackend) GetIdentityProvider

func (b *InMemoryBackend) GetIdentityProvider(id string) (IdentityProviderWire, string, error)

GetIdentityProvider returns one identity provider.

func (*InMemoryBackend) GetIdpGroupMapping

func (b *InMemoryBackend) GetIdpGroupMapping(idpID, id string) (IdpGroupMappingWire, string, error)

GetIdpGroupMapping returns one mapping.

func (*InMemoryBackend) GetMembership

func (b *InMemoryBackend) GetMembership(id string) (membershipWire, error)

GetMembership returns one membership.

func (*InMemoryBackend) GetNetworkSource

func (b *InMemoryBackend) GetNetworkSource(id string) (NetworkSourceWire, string, error)

GetNetworkSource returns one network source.

func (*InMemoryBackend) GetPolicy

func (b *InMemoryBackend) GetPolicy(id string) (policyWire, string, error)

GetPolicy returns one policy.

func (*InMemoryBackend) GetTag

func (b *InMemoryBackend) GetTag(nsID, name string) (tagWire, string, error)

GetTag returns one tag definition.

func (*InMemoryBackend) GetTagDefault

func (b *InMemoryBackend) GetTagDefault(id string) (tagDefaultWire, error)

GetTagDefault returns one tag default.

func (*InMemoryBackend) GetTagNamespace

func (b *InMemoryBackend) GetTagNamespace(id string) (tagNamespaceWire, string, error)

GetTagNamespace returns one namespace.

func (*InMemoryBackend) GetTaggingWorkRequest

func (b *InMemoryBackend) GetTaggingWorkRequest(id string) (WorkRequestWire, error)

GetTaggingWorkRequest returns one tagging work request.

func (*InMemoryBackend) GetTenancy

func (b *InMemoryBackend) GetTenancy(id string) (tenancyWire, error)

GetTenancy returns the emulated tenancy.

func (*InMemoryBackend) GetUIPasswordInfo

func (b *InMemoryBackend) GetUIPasswordInfo(userID string) (uiPasswordWire, error)

GetUIPasswordInfo returns the console password metadata (never the password).

func (*InMemoryBackend) GetUser

func (b *InMemoryBackend) GetUser(id string) (userWire, string, error)

GetUser returns one user.

func (*InMemoryBackend) GetWorkRequest

func (b *InMemoryBackend) GetWorkRequest(id string) (WorkRequestWire, error)

GetWorkRequest returns one work request.

func (*InMemoryBackend) ListAPIKeys

func (b *InMemoryBackend) ListAPIKeys(userID string) ([]apiKeyWire, error)

ListAPIKeys lists a user's API keys.

func (*InMemoryBackend) ListAvailabilityDomains

func (b *InMemoryBackend) ListAvailabilityDomains(compartment string) ([]adWire, error)

ListAvailabilityDomains returns the region's availability domains.

func (*InMemoryBackend) ListBulkEditTagsResourceTypes

func (b *InMemoryBackend) ListBulkEditTagsResourceTypes(o ListOpts) page.Page[bulkEditType]

ListBulkEditTagsResourceTypes lists the resource types BulkEditTags can edit here.

func (*InMemoryBackend) ListCompartments

func (b *InMemoryBackend) ListCompartments(f CompartmentFilter, o ListOpts) (page.Page[compartmentWire], error)

ListCompartments lists the children (or the whole subtree) of a compartment.

func (*InMemoryBackend) ListCredentials

func (b *InMemoryBackend) ListCredentials(userID string, kind credKind) ([]credWire, error)

ListCredentials lists a user's credentials of one kind, without secrets.

func (*InMemoryBackend) ListDynamicGroups

func (b *InMemoryBackend) ListDynamicGroups(f NameFilter, o ListOpts) (page.Page[dynamicGroupWire], error)

ListDynamicGroups lists dynamic groups.

func (*InMemoryBackend) ListFaultDomains

func (b *InMemoryBackend) ListFaultDomains(compartment, ad string) ([]fdWire, error)

ListFaultDomains returns the three fault domains of an availability domain.

func (*InMemoryBackend) ListGroups

func (b *InMemoryBackend) ListGroups(f NameFilter, o ListOpts) (page.Page[Meta], error)

ListGroups lists groups.

func (*InMemoryBackend) ListIdentityProviders

func (b *InMemoryBackend) ListIdentityProviders(
	protocol string,
	f NameFilter,
	o ListOpts,
) (page.Page[IdentityProviderWire], error)

ListIdentityProviders lists identity providers of a protocol.

func (*InMemoryBackend) ListIdpGroupMappings

func (b *InMemoryBackend) ListIdpGroupMappings(idpID string, o ListOpts) (page.Page[IdpGroupMappingWire], error)

ListIdpGroupMappings lists the mappings of an identity provider in creation order.

func (*InMemoryBackend) ListMemberships

func (b *InMemoryBackend) ListMemberships(
	compartment, userID, groupID string,
	o ListOpts,
) (page.Page[membershipWire], error)

ListMemberships lists memberships filtered by user and/or group.

func (*InMemoryBackend) ListNetworkSources

func (b *InMemoryBackend) ListNetworkSources(f NameFilter, o ListOpts) (page.Page[NetworkSourceWire], error)

ListNetworkSources lists network sources.

func (*InMemoryBackend) ListPolicies

func (b *InMemoryBackend) ListPolicies(f PolicyFilter, o ListOpts) (page.Page[policyWire], error)

ListPolicies lists the policies of one compartment.

func (*InMemoryBackend) ListRegionSubscriptions

func (b *InMemoryBackend) ListRegionSubscriptions(id string) ([]regionSubWire, error)

ListRegionSubscriptions returns the single home-region subscription.

func (*InMemoryBackend) ListTagDefaults

func (b *InMemoryBackend) ListTagDefaults(f TagDefaultFilter, o ListOpts) (page.Page[tagDefaultWire], error)

ListTagDefaults lists tag defaults filtered by id, compartment or tag.

func (*InMemoryBackend) ListTagNamespaces

func (b *InMemoryBackend) ListTagNamespaces(
	compartment, state string,
	subtree bool,
	o ListOpts,
) (page.Page[tagNamespaceWire], error)

ListTagNamespaces lists the namespaces of a compartment.

func (*InMemoryBackend) ListTaggingWorkRequests

func (b *InMemoryBackend) ListTaggingWorkRequests(
	compartment, resourceID string,
	o ListOpts,
) (page.Page[WorkRequestWire], error)

ListTaggingWorkRequests lists the tagging work requests of a compartment, optionally for one resource.

func (*InMemoryBackend) ListTags

func (b *InMemoryBackend) ListTags(nsID, state string, o ListOpts) (page.Page[tagWire], error)

ListTags lists the tag definitions of a namespace.

func (*InMemoryBackend) ListUsers

func (b *InMemoryBackend) ListUsers(f NameFilter, o ListOpts) (page.Page[userWire], error)

ListUsers lists users.

func (*InMemoryBackend) ListWorkRequests

func (b *InMemoryBackend) ListWorkRequests(
	compartment, resourceID string,
	o ListOpts,
) (page.Page[WorkRequestWire], error)

ListWorkRequests lists the work requests of a compartment, optionally for one resource.

func (*InMemoryBackend) MoveCompartment

func (b *InMemoryBackend) MoveCompartment(id, target, ifMatch string) (string, error)

MoveCompartment re-parents a compartment tree and returns the work request id.

func (*InMemoryBackend) RecoverCompartment

func (b *InMemoryBackend) RecoverCompartment(id string) (compartmentWire, string, error)

RecoverCompartment restores a DELETED compartment to ACTIVE.

func (*InMemoryBackend) RemoveUserFromGroup

func (b *InMemoryBackend) RemoveUserFromGroup(id string) error

RemoveUserFromGroup deletes a membership.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all state and the registered API keys.

func (*InMemoryBackend) ResetUIPassword

func (b *InMemoryBackend) ResetUIPassword(userID string) (uiPasswordWire, string, error)

ResetUIPassword generates a console password; it is returned only here.

func (*InMemoryBackend) Restore

func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error

Restore loads backend state from a snapshot.

func (*InMemoryBackend) SetClock

func (b *InMemoryBackend) SetClock(now func() time.Time)

SetClock injects the time source used for lifecycle transitions.

func (*InMemoryBackend) Snapshot

func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte

Snapshot serialises the backend state, including registered API keys.

func (*InMemoryBackend) Sweep

func (b *InMemoryBackend) Sweep()

Sweep applies due lifecycle transitions.

func (*InMemoryBackend) TagDefinition

func (b *InMemoryBackend) TagDefinition(namespace, key string) (ocitags.Def, bool)

TagDefinition resolves a defined tag namespace and key (both case-insensitive) for tag validation in other services.

func (*InMemoryBackend) TaggingWorkRequestErrors

func (b *InMemoryBackend) TaggingWorkRequestErrors(id string, o ListOpts) (page.Page[TaggingErrorWire], error)

TaggingWorkRequestErrors lists the errors of a finished tagging work request.

func (*InMemoryBackend) TaggingWorkRequestLogs

func (b *InMemoryBackend) TaggingWorkRequestLogs(id string, o ListOpts) (page.Page[TaggingWRLogWire], error)

TaggingWorkRequestLogs lists the log lines of a tagging work request.

func (*InMemoryBackend) UpdateAuthenticationPolicy

func (b *InMemoryBackend) UpdateAuthenticationPolicy(
	compartment, ifMatch string,
	in UpdateAuthPolicyIn,
) (AuthPolicyWire, string, error)

UpdateAuthenticationPolicy updates the password policy and the network sources of the network policy.

func (*InMemoryBackend) UpdateCompartment

func (b *InMemoryBackend) UpdateCompartment(
	id, ifMatch string,
	in UpdateCompartmentIn,
) (compartmentWire, string, error)

UpdateCompartment changes name, description and tags.

func (*InMemoryBackend) UpdateCredential

func (b *InMemoryBackend) UpdateCredential(userID, id string, kind credKind, text string) (credWire, string, error)

UpdateCredential changes the description or display name.

func (*InMemoryBackend) UpdateDynamicGroup

func (b *InMemoryBackend) UpdateDynamicGroup(
	id, ifMatch string,
	in UpdateDynamicGroupIn,
) (dynamicGroupWire, string, error)

UpdateDynamicGroup changes description, matching rule and tags.

func (*InMemoryBackend) UpdateGroup

func (b *InMemoryBackend) UpdateGroup(id, ifMatch string, in UpdateGroupIn) (Meta, string, error)

UpdateGroup changes description and tags.

func (*InMemoryBackend) UpdateIdentityProvider

func (b *InMemoryBackend) UpdateIdentityProvider(
	id, ifMatch string,
	in UpdateIDPIn,
) (IdentityProviderWire, string, error)

UpdateIdentityProvider changes the description, metadata, attributes and tags.

func (*InMemoryBackend) UpdateIdpGroupMapping

func (b *InMemoryBackend) UpdateIdpGroupMapping(
	idpID, id, ifMatch string,
	name, groupID *string,
) (IdpGroupMappingWire, string, error)

UpdateIdpGroupMapping changes the IDP group name or the IAM group of a mapping.

func (*InMemoryBackend) UpdateNetworkSource

func (b *InMemoryBackend) UpdateNetworkSource(
	id, ifMatch string,
	in UpdateNetworkSourceIn,
) (NetworkSourceWire, string, error)

UpdateNetworkSource changes the description, source lists, services and tags.

func (*InMemoryBackend) UpdatePolicy

func (b *InMemoryBackend) UpdatePolicy(id, ifMatch string, in UpdatePolicyIn) (policyWire, string, error)

UpdatePolicy changes description, statements, versionDate and tags.

func (*InMemoryBackend) UpdateTag

func (b *InMemoryBackend) UpdateTag(nsID, name, ifMatch string, in UpdateTagIn) (tagWire, string, error)

UpdateTag changes a tag definition.

func (*InMemoryBackend) UpdateTagDefault

func (b *InMemoryBackend) UpdateTagDefault(id string, in UpdateTagDefaultIn) (tagDefaultWire, string, error)

UpdateTagDefault changes the value or requirement of a tag default.

func (*InMemoryBackend) UpdateTagNamespace

func (b *InMemoryBackend) UpdateTagNamespace(
	id, ifMatch string,
	in UpdateTagNamespaceIn,
) (tagNamespaceWire, string, error)

UpdateTagNamespace changes description, retirement and tags.

func (*InMemoryBackend) UpdateUser

func (b *InMemoryBackend) UpdateUser(id, ifMatch string, in UpdateUserIn) (userWire, string, error)

UpdateUser changes description, email and tags.

func (*InMemoryBackend) UploadAPIKey

func (b *InMemoryBackend) UploadAPIKey(userID, pemKey string) (apiKeyWire, string, error)

UploadAPIKey registers an RSA public key for a user and with the shared signature registry.

func (*InMemoryBackend) VerifyAuthToken

func (b *InMemoryBackend) VerifyAuthToken(userName, token string) (string, bool)

VerifyAuthToken reports whether token is a current auth token of the active user with the given name, and returns that user's OCID. Identity keeps only a salted PBKDF2 digest of each token; tokens created before digests were stored have none and never verify. Every call costs at least one derivation so response time does not reveal whether the user exists.

func (*InMemoryBackend) VerifySMTPCredential

func (b *InMemoryBackend) VerifySMTPCredential(username, password string) (string, bool)

VerifySMTPCredential reports whether username and password are a current SMTP credential, and returns its user.

func (*InMemoryBackend) VerifyUIPassword

func (b *InMemoryBackend) VerifyUIPassword(userName, password string) (string, bool)

VerifyUIPassword reports whether password is the current console password of the active user with that name.

type Internal

type Internal struct {
	TransitionAt *time.Time `json:"transitionAt,omitempty"`
	TimeDeleted  *time.Time `json:"timeDeleted,omitempty"`
	Etag         string     `json:"etag"`
	Seq          int64      `json:"seq"`
}

Internal is bookkeeping that never reaches the wire.

type ListOpts

type ListOpts struct {
	SortBy string
	Order  string
	Page   string
	Limit  int
}

ListOpts carries the shared list query parameters.

type Membership

type Membership struct {
	TimeCreated   time.Time `json:"timeCreated"`
	ID            string    `json:"id"`
	CompartmentID string    `json:"compartmentId"`
	GroupID       string    `json:"groupId"`
	UserID        string    `json:"userId"`
	Seq           int64     `json:"seq"`
}

Membership links a user to a group.

type Meta

type Meta struct {
	TimeCreated time.Time `json:"timeCreated"`
	Tags
	ID             string `json:"id"`
	CompartmentID  string `json:"compartmentId"`
	Name           string `json:"name"`
	Description    string `json:"description"`
	LifecycleState string `json:"lifecycleState"`
}

Meta is the field set common to compartments, users, groups, dynamic groups and policies.

type NameFilter

type NameFilter struct {
	CompartmentID string
	Name          string
	State         string
}

NameFilter holds the common list filters of tenancy-level resources.

type NetworkPolicyWire

type NetworkPolicyWire struct {
	NetworkSourceIDs []string `json:"networkSourceIds"`
}

NetworkPolicyWire is the network policy wire shape.

type NetworkSource

type NetworkSource struct {
	Meta
	PublicSourceList  []string        `json:"publicSourceList"`
	VirtualSourceList []VirtualSource `json:"virtualSourceList"`
	Services          []string        `json:"services"`
	Internal          Internal        `json:"internal"`
}

NetworkSource is a stored network source.

type NetworkSourceWire

type NetworkSourceWire struct {
	Meta
	PublicSourceList  []string        `json:"publicSourceList"`
	VirtualSourceList []VirtualSource `json:"virtualSourceList"`
	Services          []string        `json:"services"`
}

NetworkSourceWire is the network source wire shape.

type PasswordPolicy

type PasswordPolicy struct {
	MinimumPasswordLength         int  `json:"minimumPasswordLength"`
	IsUppercaseCharactersRequired bool `json:"isUppercaseCharactersRequired"`
	IsLowercaseCharactersRequired bool `json:"isLowercaseCharactersRequired"`
	IsNumericCharactersRequired   bool `json:"isNumericCharactersRequired"`
	IsSpecialCharactersRequired   bool `json:"isSpecialCharactersRequired"`
	IsUsernameContainmentAllowed  bool `json:"isUsernameContainmentAllowed"`
}

PasswordPolicy is the tenancy password policy.

type PasswordPolicyIn

type PasswordPolicyIn struct {
	MinimumPasswordLength         *int  `json:"minimumPasswordLength"`
	IsUppercaseCharactersRequired *bool `json:"isUppercaseCharactersRequired"`
	IsLowercaseCharactersRequired *bool `json:"isLowercaseCharactersRequired"`
	IsNumericCharactersRequired   *bool `json:"isNumericCharactersRequired"`
	IsSpecialCharactersRequired   *bool `json:"isSpecialCharactersRequired"`
	IsUsernameContainmentAllowed  *bool `json:"isUsernameContainmentAllowed"`
}

PasswordPolicyIn is a partial password policy update.

type Policy

type Policy struct {
	Meta
	VersionDate string   `json:"versionDate,omitempty"`
	Statements  []string `json:"statements"`
	Internal    Internal `json:"internal"`
}

Policy is a stored IAM policy.

type PolicyFilter

type PolicyFilter struct {
	CompartmentID string
	Name          string
	State         string
}

PolicyFilter holds the ListPolicies query.

type Provider

type Provider struct{}

Provider implements service.Provider for OCI Identity. It runs on its own listener (see Handler.StartWorker) and never matches on the shared AWS router.

func (*Provider) Init

Init creates the backend and handler; the port is bound in StartWorker.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the service provider name.

type RegionSubscription

type RegionSubscription struct {
	SubscribedAt time.Time `json:"subscribedAt"`
	Key          string    `json:"key"`
}

RegionSubscription is a tenancy subscription to an extra region.

type Settings

type Settings struct {
	Port int `` //nolint:lll // config struct tags are intentionally verbose
	/* 190-byte string literal not displayed */
	EnforceAuth bool `` //nolint:lll // config struct tags are intentionally verbose
	/* 224-byte string literal not displayed */
}

Settings holds service-level configuration, embedded in the root CLI command as CLI.OCIIdentity.

func DefaultSettings

func DefaultSettings() Settings

DefaultSettings returns the settings used when no ConfigProvider is available.

type TagDef

type TagDef struct {
	Meta
	NamespaceID   string         `json:"namespaceId"`
	NamespaceName string         `json:"namespaceName"`
	Validator     map[string]any `json:"validator,omitempty"`
	Internal      Internal       `json:"internal"`
	IsRetired     bool           `json:"isRetired"`
	IsCostTrack   bool           `json:"isCostTracking"`
}

TagDef is a stored tag definition.

type TagDefault

type TagDefault struct {
	TimeCreated   time.Time `json:"timeCreated"`
	ID            string    `json:"id"`
	CompartmentID string    `json:"compartmentId"`
	NamespaceID   string    `json:"namespaceId"`
	TagID         string    `json:"tagId"`
	TagName       string    `json:"tagName"`
	Value         string    `json:"value"`
	Seq           int64     `json:"seq"`
	IsRequired    bool      `json:"isRequired"`
}

TagDefault is a stored tag default.

type TagDefaultFilter

type TagDefaultFilter struct {
	ID, CompartmentID, TagDefinitionID, State string
}

TagDefaultFilter holds the ListTagDefaults query.

type TagNamespace

type TagNamespace struct {
	Meta
	Internal  Internal `json:"internal"`
	IsRetired bool     `json:"isRetired"`
}

TagNamespace is a stored tag namespace.

type TaggingErrorWire

type TaggingErrorWire struct {
	Timestamp time.Time `json:"timestamp"`
	Code      string    `json:"code"`
	Message   string    `json:"message"`
}

TaggingErrorWire is the tagging work request error wire shape.

type TaggingWRLogWire

type TaggingWRLogWire struct {
	Timestamp time.Time `json:"timestamp"`
	Message   string    `json:"message"`
}

TaggingWRLogWire is the tagging work request log wire shape.

type Tags

type Tags struct {
	FreeformTags map[string]string         `json:"freeformTags"`
	DefinedTags  map[string]map[string]any `json:"definedTags"`
}

Tags carries the freeform and defined tags every taggable resource has.

type UpdateAuthPolicyIn

type UpdateAuthPolicyIn struct {
	PasswordPolicy *PasswordPolicyIn  `json:"passwordPolicy"`
	NetworkPolicy  *NetworkPolicyWire `json:"networkPolicy"`
}

UpdateAuthPolicyIn is the UpdateAuthenticationPolicy request body.

type UpdateCompartmentIn

type UpdateCompartmentIn struct {
	Name        *string `json:"name"`
	Description *string `json:"description"`
	Tags
}

UpdateCompartmentIn is the UpdateCompartment request body.

type UpdateDynamicGroupIn

type UpdateDynamicGroupIn struct {
	Description  *string `json:"description"`
	MatchingRule *string `json:"matchingRule"`
	Tags
}

UpdateDynamicGroupIn is the UpdateDynamicGroup request body.

type UpdateGroupIn

type UpdateGroupIn struct {
	Description *string `json:"description"`
	Tags
}

UpdateGroupIn is the UpdateGroup request body.

type UpdateIDPIn

type UpdateIDPIn struct {
	Tags
	Description        *string           `json:"description"`
	MetadataURL        *string           `json:"metadataUrl"`
	Metadata           *string           `json:"metadata"`
	FreeformAttributes map[string]string `json:"freeformAttributes"`
	Protocol           string            `json:"protocol"`
}

UpdateIDPIn is the UpdateIdentityProvider request body.

type UpdateNetworkSourceIn

type UpdateNetworkSourceIn struct {
	Tags
	Description       *string         `json:"description"`
	PublicSourceList  []string        `json:"publicSourceList"`
	VirtualSourceList []VirtualSource `json:"virtualSourceList"`
	Services          []string        `json:"services"`
}

UpdateNetworkSourceIn is the UpdateNetworkSource request body.

type UpdatePolicyIn

type UpdatePolicyIn struct {
	Tags
	Description *string  `json:"description"`
	VersionDate *string  `json:"versionDate"`
	Statements  []string `json:"statements"`
}

UpdatePolicyIn is the UpdatePolicy request body.

type UpdateTagDefaultIn

type UpdateTagDefaultIn struct {
	IsRequired *bool  `json:"isRequired"`
	Value      string `json:"value"`
}

UpdateTagDefaultIn is the UpdateTagDefault request body.

type UpdateTagIn

type UpdateTagIn struct {
	Description    *string        `json:"description"`
	IsRetired      *bool          `json:"isRetired"`
	IsCostTracking *bool          `json:"isCostTracking"`
	Validator      map[string]any `json:"validator"`
	Tags
}

UpdateTagIn is the UpdateTag request body.

type UpdateTagNamespaceIn

type UpdateTagNamespaceIn struct {
	Description *string `json:"description"`
	IsRetired   *bool   `json:"isRetired"`
	Tags
}

UpdateTagNamespaceIn is the UpdateTagNamespace request body.

type UpdateUserIn

type UpdateUserIn struct {
	Description *string `json:"description"`
	Email       *string `json:"email"`
	DBUserName  *string `json:"dbUserName"`
	Tags
}

UpdateUserIn is the UpdateUser request body.

type User

type User struct {
	UIPasswordCreated *time.Time `json:"uiPasswordCreated,omitempty"`
	Meta
	Email            string       `json:"email,omitempty"`
	DBUserName       string       `json:"dbUserName,omitempty"`
	UIPasswordSalt   string       `json:"uiPasswordSalt,omitempty"`
	UIPasswordDigest string       `json:"uiPasswordDigest,omitempty"`
	Internal         Internal     `json:"internal"`
	APIKeys          []APIKey     `json:"apiKeys"`
	AuthTokens       []Credential `json:"authTokens"`
	SecretKeys       []Credential `json:"secretKeys"`
	SMTP             []Credential `json:"smtp"`
	Capabilities     Capabilities `json:"capabilities"`
}

User is a stored IAM user with its credentials.

type VirtualSource

type VirtualSource struct {
	VcnID    string   `json:"vcnId"`
	IPRanges []string `json:"ipRanges"`
}

VirtualSource is a VCN and the IP ranges allowed from it.

type WorkRequest

type WorkRequest struct {
	Accepted      time.Time `json:"accepted"`
	FinishAt      time.Time `json:"finishAt"`
	ID            string    `json:"id"`
	Operation     string    `json:"operation"`
	CompartmentID string    `json:"compartmentId"`
	EntityType    string    `json:"entityType"`
	EntityID      string    `json:"entityId"`
	Action        string    `json:"action"`
	Bulk          *BulkJob  `json:"bulk,omitempty"`
	FailedAt      time.Time `json:"failedAt,omitzero"`
	FailCode      string    `json:"failCode,omitempty"`
	FailMessage   string    `json:"failMessage,omitempty"`
	Seq           int64     `json:"seq"`
}

WorkRequest tracks an asynchronous compartment or tag operation.

type WorkRequestWire

type WorkRequestWire struct {
	TimeAccepted    time.Time        `json:"timeAccepted"`
	TimeStarted     *time.Time       `json:"timeStarted,omitempty"`
	TimeFinished    *time.Time       `json:"timeFinished,omitempty"`
	OperationType   string           `json:"operationType"`
	Status          string           `json:"status"`
	ID              string           `json:"id"`
	CompartmentID   string           `json:"compartmentId"`
	Resources       []wrResourceWire `json:"resources"`
	Errors          []wrErrorWire    `json:"errors"`
	PercentComplete float32          `json:"percentComplete"`
}

WorkRequestWire is the work request wire shape.

Jump to

Keyboard shortcuts

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