Documentation
¶
Index ¶
- Variables
- type AccessControlRule
- type AvailabilityConfiguration
- type AvailabilityEwsProvider
- type CreateUserParams
- type DNSRecord
- type Delegate
- type EmailMonitoringConfiguration
- type EntityDescription
- type FolderConfiguration
- type Group
- type GroupFilter
- type GroupSummary
- type Handler
- func (h *Handler) ChaosOperations() []string
- func (h *Handler) ChaosRegions() []string
- func (h *Handler) ChaosServiceName() string
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(_ *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Register(_ context.Context, _ *echo.Echo) error
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Snapshot(ctx context.Context) []byte
- type IdentityProviderConfiguration
- type ImpersonationMatchedRule
- type ImpersonationRole
- type ImpersonationRule
- type InMemoryBackend
- func (b *InMemoryBackend) AccountID() string
- func (b *InMemoryBackend) AssociateDelegateToResource(orgID, resourceID, entityID string) error
- func (b *InMemoryBackend) AssociateMemberToGroup(orgID, groupID, memberID string) error
- func (b *InMemoryBackend) AssumeImpersonationRole(orgID, roleID string) (string, int64, error)
- func (b *InMemoryBackend) CancelMailboxExportJob(orgID, jobID string) error
- func (b *InMemoryBackend) CreateAlias(orgID, entityID, alias string) error
- func (b *InMemoryBackend) CreateAvailabilityConfiguration(orgID, domainName string, ewsProvider *AvailabilityEwsProvider, ...) (*AvailabilityConfiguration, error)
- func (b *InMemoryBackend) CreateGroup(orgID, name string, hidden bool) (*Group, error)
- func (b *InMemoryBackend) CreateIdentityCenterApplication(instanceARN, name string) (string, error)
- func (b *InMemoryBackend) CreateImpersonationRole(orgID, name, roleType, description string, rules []ImpersonationRule) (*ImpersonationRole, error)
- func (b *InMemoryBackend) CreateMobileDeviceAccessRule(orgID, name, effect, description string, ...) (*MobileDeviceAccessRule, error)
- func (b *InMemoryBackend) CreateOrganization(ctx context.Context, alias string, domains []string) (*Organization, error)
- func (b *InMemoryBackend) CreatePersonalAccessToken(orgID, userID, name string, scopes []string) (*PersonalAccessToken, error)
- func (b *InMemoryBackend) CreateResource(orgID, name, resourceType, description string) (*Resource, error)
- func (b *InMemoryBackend) CreateUser(orgID, name string, params CreateUserParams) (*User, error)
- func (b *InMemoryBackend) DeleteAccessControlRule(orgID, name string) error
- func (b *InMemoryBackend) DeleteAlias(orgID, entityID, alias string) error
- func (b *InMemoryBackend) DeleteAvailabilityConfiguration(orgID, domainName string) error
- func (b *InMemoryBackend) DeleteEmailMonitoringConfiguration(orgID string) error
- func (b *InMemoryBackend) DeleteGroup(orgID, entityID string) error
- func (b *InMemoryBackend) DeleteIdentityCenterApplication(applicationARN string) error
- func (b *InMemoryBackend) DeleteIdentityProviderConfiguration(orgID string) error
- func (b *InMemoryBackend) DeleteImpersonationRole(orgID, roleID string) error
- func (b *InMemoryBackend) DeleteMailboxPermissions(orgID, entityID, granteeID string) error
- func (b *InMemoryBackend) DeleteMobileDeviceAccessOverride(orgID, userID, deviceID string) error
- func (b *InMemoryBackend) DeleteMobileDeviceAccessRule(orgID, ruleID string) error
- func (b *InMemoryBackend) DeleteOrganization(orgID string, _ bool) error
- func (b *InMemoryBackend) DeletePersonalAccessToken(orgID, tokenID string) error
- func (b *InMemoryBackend) DeleteResource(orgID, entityID string) error
- func (b *InMemoryBackend) DeleteRetentionPolicy(orgID, id string) error
- func (b *InMemoryBackend) DeleteUser(orgID, entityID string) error
- func (b *InMemoryBackend) DeregisterFromWorkMail(orgID, entityID string) error
- func (b *InMemoryBackend) DeregisterMailDomain(orgID, domainName string) error
- func (b *InMemoryBackend) DescribeEmailMonitoringConfiguration(orgID string) (*EmailMonitoringConfiguration, error)
- func (b *InMemoryBackend) DescribeEntity(orgID, identifier string) (*EntityDescription, error)
- func (b *InMemoryBackend) DescribeGroup(orgID, entityID string) (*Group, error)
- func (b *InMemoryBackend) DescribeIdentityProviderConfiguration(orgID string) (*IdentityProviderConfiguration, error)
- func (b *InMemoryBackend) DescribeInboundDmarcSettings(orgID string) (bool, error)
- func (b *InMemoryBackend) DescribeMailboxExportJob(orgID, jobID string) (*MailboxExportJob, error)
- func (b *InMemoryBackend) DescribeOrganization(orgID string) (*Organization, error)
- func (b *InMemoryBackend) DescribeResource(orgID, entityID string) (*Resource, error)
- func (b *InMemoryBackend) DescribeUser(orgID, entityID string) (*User, error)
- func (b *InMemoryBackend) DisassociateDelegateFromResource(orgID, resourceID, entityID string) error
- func (b *InMemoryBackend) DisassociateMemberFromGroup(orgID, groupID, memberID string) error
- func (b *InMemoryBackend) GetAccessControlEffect(orgID, ipAddr, action, userID, impersonationRoleID string) (string, []string, error)
- func (b *InMemoryBackend) GetDefaultRetentionPolicy(orgID string) (*RetentionPolicy, error)
- func (b *InMemoryBackend) GetImpersonationRole(orgID, roleID string) (*ImpersonationRole, error)
- func (b *InMemoryBackend) GetImpersonationRoleEffect(orgID, roleID, targetUser string) (string, string, []*ImpersonationMatchedRule, error)
- func (b *InMemoryBackend) GetMailDomain(orgID, domainName string) (*MailDomain, error)
- func (b *InMemoryBackend) GetMailboxDetails(orgID, userID string) (*MailboxDetails, error)
- func (b *InMemoryBackend) GetMobileDeviceAccessEffect(orgID, deviceType, deviceModel, deviceOS, deviceUserAgent string) (string, []*MobileDeviceMatchedRule, error)
- func (b *InMemoryBackend) GetMobileDeviceAccessOverride(orgID, userID, deviceID string) (*MobileDeviceAccessOverride, error)
- func (b *InMemoryBackend) GetPersonalAccessTokenMetadata(orgID, tokenID string) (*PersonalAccessToken, error)
- func (b *InMemoryBackend) ListAccessControlRules(orgID string) ([]*AccessControlRule, error)
- func (b *InMemoryBackend) ListAliases(orgID, entityID string, maxResults int32, nextToken string) ([]string, string, error)
- func (b *InMemoryBackend) ListAvailabilityConfigurations(orgID string, maxResults int32, nextToken string) ([]*AvailabilityConfiguration, string, error)
- func (b *InMemoryBackend) ListGroupMembers(orgID, groupID string, maxResults int32, nextToken string) ([]*Member, string, error)
- func (b *InMemoryBackend) ListGroups(orgID string, filter *GroupFilter, maxResults int32, nextToken string) ([]*GroupSummary, string, error)
- func (b *InMemoryBackend) ListGroupsForEntity(orgID, entityID, groupNamePrefix string, maxResults int32, nextToken string) ([]*GroupSummary, string, error)
- func (b *InMemoryBackend) ListImpersonationRoles(orgID string, maxResults int32, nextToken string) ([]*ImpersonationRole, string, error)
- func (b *InMemoryBackend) ListMailDomains(orgID string, maxResults int32, nextToken string) ([]*MailDomainSummary, string, error)
- func (b *InMemoryBackend) ListMailboxExportJobs(orgID string, maxResults int32, nextToken string) ([]*MailboxExportJob, string, error)
- func (b *InMemoryBackend) ListMailboxPermissions(orgID, entityID string, maxResults int32, nextToken string) ([]*Permission, string, error)
- func (b *InMemoryBackend) ListMobileDeviceAccessOverrides(orgID, userID, deviceID string, maxResults int32, nextToken string) ([]*MobileDeviceAccessOverride, string, error)
- func (b *InMemoryBackend) ListMobileDeviceAccessRules(orgID string) ([]*MobileDeviceAccessRule, error)
- func (b *InMemoryBackend) ListOrganizations(ctx context.Context, maxResults int32, nextToken string) ([]*OrgSummary, string, error)
- func (b *InMemoryBackend) ListPersonalAccessTokens(orgID, userID string, maxResults int32, nextToken string) ([]*PersonalAccessToken, string, error)
- func (b *InMemoryBackend) ListResourceDelegates(orgID, resourceID string, maxResults int32, nextToken string) ([]*Delegate, string, error)
- func (b *InMemoryBackend) ListResources(orgID string, filter *ResourceFilter, maxResults int32, nextToken string) ([]*ResourceSummary, string, error)
- func (b *InMemoryBackend) ListTagsForResource(resourceARN string) ([]Tag, error)
- func (b *InMemoryBackend) ListUsers(orgID string, filter *UserFilter, maxResults int32, nextToken string) ([]*UserSummary, string, error)
- func (b *InMemoryBackend) PutAccessControlRule(orgID string, params PutAccessControlRuleParams) (*AccessControlRule, error)
- func (b *InMemoryBackend) PutEmailMonitoringConfiguration(orgID, roleARN, logGroupARN string) error
- func (b *InMemoryBackend) PutIdentityProviderConfiguration(...) error
- func (b *InMemoryBackend) PutInboundDmarcSettings(orgID string, enforced bool) error
- func (b *InMemoryBackend) PutMailboxPermissions(orgID, entityID, granteeID string, perms []string) error
- func (b *InMemoryBackend) PutMobileDeviceAccessOverride(orgID, userID, deviceID, effect, description string) error
- func (b *InMemoryBackend) PutRetentionPolicy(orgID, id, name, description string, ...) error
- func (b *InMemoryBackend) Region() string
- func (b *InMemoryBackend) RegisterMailDomain(orgID, domainName string) error
- func (b *InMemoryBackend) RegisterToWorkMail(orgID, entityID, email string) error
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) ResetPassword(orgID, userID, _ string) error
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) StartMailboxExportJob(...) (*MailboxExportJob, error)
- func (b *InMemoryBackend) TagResource(resourceARN string, tags []Tag) error
- func (b *InMemoryBackend) TestAvailabilityConfiguration(orgID, domainName string) (bool, string, error)
- func (b *InMemoryBackend) UntagResource(resourceARN string, tagKeys []string) error
- func (b *InMemoryBackend) UpdateAvailabilityConfiguration(orgID, domainName string, ewsProvider *AvailabilityEwsProvider, ...) error
- func (b *InMemoryBackend) UpdateDefaultMailDomain(orgID, domainName string) error
- func (b *InMemoryBackend) UpdateGroup(orgID, entityID string, hidden bool) error
- func (b *InMemoryBackend) UpdateImpersonationRole(orgID, roleID, name, roleType, description string, rules []ImpersonationRule) error
- func (b *InMemoryBackend) UpdateMailboxQuota(orgID, userID string, quota int32) error
- func (b *InMemoryBackend) UpdateMobileDeviceAccessRule(orgID, ruleID, name, effect, description string, ...) error
- func (b *InMemoryBackend) UpdatePrimaryEmailAddress(orgID, entityID, email string) error
- func (b *InMemoryBackend) UpdateResource(orgID, entityID, name, description string) error
- func (b *InMemoryBackend) UpdateUser(orgID, entityID string, params UpdateUserParams) error
- type MailDomain
- type MailDomainSummary
- type MailboxDetails
- type MailboxExportJob
- type Member
- type MobileDeviceAccessOverride
- type MobileDeviceAccessRule
- type MobileDeviceMatchedRule
- type OrgSummary
- type Organization
- type Permission
- type PersonalAccessToken
- type Provider
- type PutAccessControlRuleParams
- type Resource
- type ResourceFilter
- type ResourceSummary
- type RetentionPolicy
- type StorageBackend
- type Tag
- type UpdateUserParams
- type User
- type UserFilter
- type UserSummary
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNotFound is returned when a requested resource does not exist. ErrNotFound = awserr.New("EntityNotFoundException", awserr.ErrNotFound) // ErrConflict is returned when a resource already exists. ErrConflict = awserr.New("EntityAlreadyExistsException", awserr.ErrAlreadyExists) // ErrValidation is returned for invalid request parameters. ErrValidation = awserr.New("InvalidParameterException", awserr.ErrInvalidParameter) // ErrLimitExceeded is returned when resource limits are hit. ErrLimitExceeded = awserr.New("LimitExceededException", awserr.ErrConflict) // ErrMailDomainState is returned for domain state issues. ErrMailDomainState = awserr.New("MailDomainStateException", awserr.ErrConflict) // ErrEntityState is returned when an operation violates entity state constraints. ErrEntityState = awserr.New("EntityStateException", awserr.ErrConflict) )
Functions ¶
This section is empty.
Types ¶
type AccessControlRule ¶
type AccessControlRule struct {
DateCreated time.Time
DateModified time.Time
Name string
Effect string
Description string
IPRanges []string
NotIPRanges []string
Actions []string
NotActions []string
UserIDs []string
NotUserIDs []string
// ImpersonationRoleIDs/NotImpersonationRoleIDs mirror
// types.AccessControlRule's ImpersonationRoleIds/NotImpersonationRoleIds,
// added to the real API after impersonation roles shipped.
ImpersonationRoleIDs []string
NotImpersonationRoleIDs []string
// contains filtered or unexported fields
}
AccessControlRule represents a WorkMail access control rule.
type AvailabilityConfiguration ¶
type AvailabilityConfiguration struct {
DateCreated time.Time
DateModified time.Time
DomainName string
ProviderType string
EwsEndpoint string
EwsUsername string
LambdaARN string
// contains filtered or unexported fields
}
AvailabilityConfiguration holds an availability provider config.
type AvailabilityEwsProvider ¶
AvailabilityEwsProvider holds EWS availability provider credentials.
type CreateUserParams ¶ added in v1.2.0
type CreateUserParams struct {
DisplayName string
Password string
Role string
FirstName string
LastName string
IdentityProviderUserID string
HiddenFromGlobalAddressList bool
}
CreateUserParams mirrors aws-sdk-go-v2/service/workmail's CreateUserInput (minus the required Name/OrganizationId, threaded as explicit args).
type EmailMonitoringConfiguration ¶
type EmailMonitoringConfiguration struct {
RoleARN string
LogGroupARN string
// contains filtered or unexported fields
}
EmailMonitoringConfiguration holds email monitoring config.
type EntityDescription ¶
EntityDescription describes an entity (user, group, resource).
type FolderConfiguration ¶
FolderConfiguration holds a retention policy folder config.
type Group ¶
type Group struct {
CreatedAt time.Time
EnabledDate time.Time
DisabledDate time.Time
GroupID string
Name string
Email string
State string
ARN string
Hidden bool
// contains filtered or unexported fields
}
Group represents a WorkMail group.
type GroupFilter ¶ added in v1.2.0
GroupFilter mirrors aws-sdk-go-v2/service/workmail/types.ListGroupsFilters.
type GroupSummary ¶
GroupSummary is a summary of a WorkMail group.
type Handler ¶
type Handler struct {
Backend StorageBackend
// contains filtered or unexported fields
}
Handler serves Amazon WorkMail JSON operations.
func NewHandler ¶
func NewHandler(backend StorageBackend) *Handler
NewHandler creates a WorkMail handler backed by the provided storage backend.
func (*Handler) ChaosOperations ¶
ChaosOperations returns operations eligible for fault injection.
func (*Handler) ChaosRegions ¶
ChaosRegions returns configured service regions.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the signing service name.
func (*Handler) ExtractOperation ¶
ExtractOperation returns the operation name from X-Amz-Target.
func (*Handler) ExtractResource ¶
ExtractResource returns the primary resource identifier from the request body.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns the list of implemented operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler function.
func (*Handler) MatchPriority ¶
MatchPriority returns routing priority.
func (*Handler) RouteMatcher ¶
RouteMatcher matches WorkMail X-Amz-Target headers.
func (*Handler) Snapshot ¶
Snapshot implements persistence.Persistable by delegating to the backend. Handler previously had no Snapshot/Restore of its own -- and neither did InMemoryBackend -- so cli.go's generic setupPersistence (which type-asserts the registered service.Registerable, i.e. the Handler, for a Snapshot/Restore pair) never picked WorkMail up at all: dead wiring, with no persistence underneath it either. This delegation (matching the codecommit/codepipeline/emr pattern) is what wires WorkMail into persistence for the first time.
type IdentityProviderConfiguration ¶
type IdentityProviderConfiguration struct {
PATLifetimeDays *int32
AuthMode string
IdentityCenterAppARN string
IdentityCenterInstanceARN string
PATStatus string
// contains filtered or unexported fields
}
IdentityProviderConfiguration holds IdP configuration.
type ImpersonationMatchedRule ¶
ImpersonationMatchedRule is a matched impersonation rule.
type ImpersonationRole ¶
type ImpersonationRole struct {
DateCreated time.Time
DateModified time.Time
RoleID string
Name string
RoleType string
Description string
Rules []ImpersonationRule
// contains filtered or unexported fields
}
ImpersonationRole represents a WorkMail impersonation role.
type ImpersonationRule ¶
type ImpersonationRule struct {
RuleID string
Name string
Description string
Effect string
TargetUsers []string
NotTargetUsers []string
}
ImpersonationRule is a rule within an impersonation role.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend stores WorkMail state in memory.
func NewInMemoryBackend ¶
func NewInMemoryBackend(accountID, region string) *InMemoryBackend
NewInMemoryBackend creates a new in-memory WorkMail backend.
func (*InMemoryBackend) AccountID ¶
func (b *InMemoryBackend) AccountID() string
AccountID returns the configured account ID.
func (*InMemoryBackend) AssociateDelegateToResource ¶
func (b *InMemoryBackend) AssociateDelegateToResource(orgID, resourceID, entityID string) error
AssociateDelegateToResource adds a delegate to a resource.
func (*InMemoryBackend) AssociateMemberToGroup ¶
func (b *InMemoryBackend) AssociateMemberToGroup(orgID, groupID, memberID string) error
AssociateMemberToGroup adds a member to a group.
func (*InMemoryBackend) AssumeImpersonationRole ¶
func (b *InMemoryBackend) AssumeImpersonationRole(orgID, roleID string) (string, int64, error)
AssumeImpersonationRole issues a validated token for an impersonation role.
func (*InMemoryBackend) CancelMailboxExportJob ¶
func (b *InMemoryBackend) CancelMailboxExportJob(orgID, jobID string) error
CancelMailboxExportJob cancels a running mailbox export job.
func (*InMemoryBackend) CreateAlias ¶
func (b *InMemoryBackend) CreateAlias(orgID, entityID, alias string) error
CreateAlias creates an email alias for an entity.
func (*InMemoryBackend) CreateAvailabilityConfiguration ¶
func (b *InMemoryBackend) CreateAvailabilityConfiguration( orgID, domainName string, ewsProvider *AvailabilityEwsProvider, lambdaARN string, ) (*AvailabilityConfiguration, error)
CreateAvailabilityConfiguration creates an availability configuration for a domain.
func (*InMemoryBackend) CreateGroup ¶
func (b *InMemoryBackend) CreateGroup(orgID, name string, hidden bool) (*Group, error)
CreateGroup creates a new WorkMail group.
func (*InMemoryBackend) CreateIdentityCenterApplication ¶
func (b *InMemoryBackend) CreateIdentityCenterApplication( instanceARN, name string, ) (string, error)
CreateIdentityCenterApplication creates a new IAM Identity Center application.
func (*InMemoryBackend) CreateImpersonationRole ¶
func (b *InMemoryBackend) CreateImpersonationRole( orgID, name, roleType, description string, rules []ImpersonationRule, ) (*ImpersonationRole, error)
CreateImpersonationRole creates a new impersonation role.
func (*InMemoryBackend) CreateMobileDeviceAccessRule ¶
func (b *InMemoryBackend) CreateMobileDeviceAccessRule( orgID, name, effect, description string, deviceModels, notDeviceModels, deviceTypes, notDeviceTypes, deviceOperatingSystems, notDeviceOperatingSystems, deviceUserAgents, notDeviceUserAgents []string, ) (*MobileDeviceAccessRule, error)
CreateMobileDeviceAccessRule creates a mobile device access rule.
func (*InMemoryBackend) CreateOrganization ¶
func (b *InMemoryBackend) CreateOrganization( ctx context.Context, alias string, domains []string, ) (*Organization, error)
CreateOrganization creates a new WorkMail organization.
func (*InMemoryBackend) CreatePersonalAccessToken ¶
func (b *InMemoryBackend) CreatePersonalAccessToken( orgID, userID, name string, scopes []string, ) (*PersonalAccessToken, error)
CreatePersonalAccessToken creates a new personal access token (for testing).
func (*InMemoryBackend) CreateResource ¶
func (b *InMemoryBackend) CreateResource( orgID, name, resourceType, description string, ) (*Resource, error)
CreateResource creates a new WorkMail resource.
func (*InMemoryBackend) CreateUser ¶
func (b *InMemoryBackend) CreateUser(orgID, name string, params CreateUserParams) (*User, error)
CreateUser creates a new WorkMail user.
func (*InMemoryBackend) DeleteAccessControlRule ¶
func (b *InMemoryBackend) DeleteAccessControlRule(orgID, name string) error
DeleteAccessControlRule removes an access control rule.
func (*InMemoryBackend) DeleteAlias ¶
func (b *InMemoryBackend) DeleteAlias(orgID, entityID, alias string) error
DeleteAlias removes an email alias.
func (*InMemoryBackend) DeleteAvailabilityConfiguration ¶
func (b *InMemoryBackend) DeleteAvailabilityConfiguration(orgID, domainName string) error
DeleteAvailabilityConfiguration deletes an availability configuration.
func (*InMemoryBackend) DeleteEmailMonitoringConfiguration ¶
func (b *InMemoryBackend) DeleteEmailMonitoringConfiguration(orgID string) error
DeleteEmailMonitoringConfiguration removes email monitoring config for an org.
func (*InMemoryBackend) DeleteGroup ¶
func (b *InMemoryBackend) DeleteGroup(orgID, entityID string) error
DeleteGroup deletes a group. Both DeleteGroup and DeleteResource are org-check + find + state-guard + email/globalAliases cleanup + cascadeCleanEntity (the actual shared cascade logic is already deduped into cascadeCleanEntity in store.go) + own-table delete; the remaining shape differs only in field/type names (Group/GroupID/groupsByEmail/ groupMembers vs Resource/ResourceID/resourcesByEmail/delegates), which a generic helper isn't worth introducing for.
func (*InMemoryBackend) DeleteIdentityCenterApplication ¶
func (b *InMemoryBackend) DeleteIdentityCenterApplication(applicationARN string) error
DeleteIdentityCenterApplication removes an IAM Identity Center application.
func (*InMemoryBackend) DeleteIdentityProviderConfiguration ¶
func (b *InMemoryBackend) DeleteIdentityProviderConfiguration(orgID string) error
DeleteIdentityProviderConfiguration removes IdP configuration.
func (*InMemoryBackend) DeleteImpersonationRole ¶
func (b *InMemoryBackend) DeleteImpersonationRole(orgID, roleID string) error
DeleteImpersonationRole removes an impersonation role.
func (*InMemoryBackend) DeleteMailboxPermissions ¶
func (b *InMemoryBackend) DeleteMailboxPermissions(orgID, entityID, granteeID string) error
DeleteMailboxPermissions removes mailbox permissions.
func (*InMemoryBackend) DeleteMobileDeviceAccessOverride ¶
func (b *InMemoryBackend) DeleteMobileDeviceAccessOverride(orgID, userID, deviceID string) error
DeleteMobileDeviceAccessOverride removes a per-user per-device override.
func (*InMemoryBackend) DeleteMobileDeviceAccessRule ¶
func (b *InMemoryBackend) DeleteMobileDeviceAccessRule(orgID, ruleID string) error
DeleteMobileDeviceAccessRule deletes a mobile device access rule.
func (*InMemoryBackend) DeleteOrganization ¶
func (b *InMemoryBackend) DeleteOrganization(orgID string, _ bool) error
DeleteOrganization removes a WorkMail organization and every collection nested under it, including the two that were previously left behind as ghost rows (see deleteTagsForOrg/deleteGlobalAliasesForOrg): tags on the organization itself and on every user/group/resource it contained, and globalAliases rows (primary emails and CreateAlias-created aliases alike) for every entity that belonged to it. availabilityConfigs, mobileDeviceRules, mobileDeviceOverrides, emailMonitoring, inboundDmarc, retentionPolicies, exportJobs, identityCenterApps, idpConfig, personalTokens, and issuedTokens are deliberately left untouched, matching prior behavior.
func (*InMemoryBackend) DeletePersonalAccessToken ¶
func (b *InMemoryBackend) DeletePersonalAccessToken(orgID, tokenID string) error
DeletePersonalAccessToken removes a personal access token.
func (*InMemoryBackend) DeleteResource ¶
func (b *InMemoryBackend) DeleteResource(orgID, entityID string) error
DeleteResource removes a resource. See the doc comment on DeleteGroup in groups.go for the shared-logic rationale.
func (*InMemoryBackend) DeleteRetentionPolicy ¶
func (b *InMemoryBackend) DeleteRetentionPolicy(orgID, id string) error
DeleteRetentionPolicy removes the retention policy from an org.
func (*InMemoryBackend) DeleteUser ¶
func (b *InMemoryBackend) DeleteUser(orgID, entityID string) error
DeleteUser removes a user.
func (*InMemoryBackend) DeregisterFromWorkMail ¶
func (b *InMemoryBackend) DeregisterFromWorkMail(orgID, entityID string) error
DeregisterFromWorkMail removes an email address assignment.
func (*InMemoryBackend) DeregisterMailDomain ¶
func (b *InMemoryBackend) DeregisterMailDomain(orgID, domainName string) error
DeregisterMailDomain removes a domain from the organization.
func (*InMemoryBackend) DescribeEmailMonitoringConfiguration ¶
func (b *InMemoryBackend) DescribeEmailMonitoringConfiguration( orgID string, ) (*EmailMonitoringConfiguration, error)
DescribeEmailMonitoringConfiguration returns email monitoring config for an org.
func (*InMemoryBackend) DescribeEntity ¶
func (b *InMemoryBackend) DescribeEntity(orgID, identifier string) (*EntityDescription, error)
DescribeEntity describes an entity looked up by its primary email address (DescribeEntityInput.Email is the only lookup field the real API accepts -- see aws-sdk-go-v2/service/workmail/api_op_DescribeEntity.go). The plain findUser/findGroup/findResource ID-or-name lookup never matches an email (they only check the composite-key ID and the Name field), so email lookup is checked first via the byEmail reverse-index maps; ID/name is kept as a fallback for backward compatibility with any caller that already has the entity's own ID.
func (*InMemoryBackend) DescribeGroup ¶
func (b *InMemoryBackend) DescribeGroup(orgID, entityID string) (*Group, error)
DescribeGroup returns group details.
func (*InMemoryBackend) DescribeIdentityProviderConfiguration ¶
func (b *InMemoryBackend) DescribeIdentityProviderConfiguration( orgID string, ) (*IdentityProviderConfiguration, error)
DescribeIdentityProviderConfiguration returns IdP configuration for an org.
func (*InMemoryBackend) DescribeInboundDmarcSettings ¶
func (b *InMemoryBackend) DescribeInboundDmarcSettings(orgID string) (bool, error)
DescribeInboundDmarcSettings returns whether inbound DMARC is enforced for an org.
func (*InMemoryBackend) DescribeMailboxExportJob ¶
func (b *InMemoryBackend) DescribeMailboxExportJob(orgID, jobID string) (*MailboxExportJob, error)
DescribeMailboxExportJob returns details of a mailbox export job.
func (*InMemoryBackend) DescribeOrganization ¶
func (b *InMemoryBackend) DescribeOrganization(orgID string) (*Organization, error)
DescribeOrganization returns details about an organization.
func (*InMemoryBackend) DescribeResource ¶
func (b *InMemoryBackend) DescribeResource(orgID, entityID string) (*Resource, error)
DescribeResource returns resource details.
func (*InMemoryBackend) DescribeUser ¶
func (b *InMemoryBackend) DescribeUser(orgID, entityID string) (*User, error)
DescribeUser returns details about a user.
func (*InMemoryBackend) DisassociateDelegateFromResource ¶
func (b *InMemoryBackend) DisassociateDelegateFromResource( orgID, resourceID, entityID string, ) error
DisassociateDelegateFromResource removes a delegate from a resource.
func (*InMemoryBackend) DisassociateMemberFromGroup ¶
func (b *InMemoryBackend) DisassociateMemberFromGroup(orgID, groupID, memberID string) error
DisassociateMemberFromGroup removes a member from a group.
func (*InMemoryBackend) GetAccessControlEffect ¶
func (b *InMemoryBackend) GetAccessControlEffect( orgID, ipAddr, action, userID, impersonationRoleID string, ) (string, []string, error)
GetAccessControlEffect evaluates access control rules.
func (*InMemoryBackend) GetDefaultRetentionPolicy ¶
func (b *InMemoryBackend) GetDefaultRetentionPolicy(orgID string) (*RetentionPolicy, error)
GetDefaultRetentionPolicy returns the retention policy for an org.
func (*InMemoryBackend) GetImpersonationRole ¶
func (b *InMemoryBackend) GetImpersonationRole(orgID, roleID string) (*ImpersonationRole, error)
GetImpersonationRole returns an impersonation role.
func (*InMemoryBackend) GetImpersonationRoleEffect ¶
func (b *InMemoryBackend) GetImpersonationRoleEffect( orgID, roleID, targetUser string, ) (string, string, []*ImpersonationMatchedRule, error)
GetImpersonationRoleEffect evaluates impersonation rules for a target user.
func (*InMemoryBackend) GetMailDomain ¶
func (b *InMemoryBackend) GetMailDomain(orgID, domainName string) (*MailDomain, error)
GetMailDomain returns details about a registered domain.
func (*InMemoryBackend) GetMailboxDetails ¶
func (b *InMemoryBackend) GetMailboxDetails(orgID, userID string) (*MailboxDetails, error)
GetMailboxDetails returns mailbox quota and usage.
func (*InMemoryBackend) GetMobileDeviceAccessEffect ¶
func (b *InMemoryBackend) GetMobileDeviceAccessEffect( orgID, deviceType, deviceModel, deviceOS, deviceUserAgent string, ) (string, []*MobileDeviceMatchedRule, error)
GetMobileDeviceAccessEffect evaluates rules for a simulated device.
func (*InMemoryBackend) GetMobileDeviceAccessOverride ¶
func (b *InMemoryBackend) GetMobileDeviceAccessOverride( orgID, userID, deviceID string, ) (*MobileDeviceAccessOverride, error)
GetMobileDeviceAccessOverride retrieves a per-user per-device override.
func (*InMemoryBackend) GetPersonalAccessTokenMetadata ¶
func (b *InMemoryBackend) GetPersonalAccessTokenMetadata( orgID, tokenID string, ) (*PersonalAccessToken, error)
GetPersonalAccessTokenMetadata returns metadata for a personal access token.
func (*InMemoryBackend) ListAccessControlRules ¶
func (b *InMemoryBackend) ListAccessControlRules(orgID string) ([]*AccessControlRule, error)
ListAccessControlRules returns all access control rules.
func (*InMemoryBackend) ListAliases ¶
func (b *InMemoryBackend) ListAliases( orgID, entityID string, maxResults int32, nextToken string, ) ([]string, string, error)
ListAliases returns aliases for an entity.
func (*InMemoryBackend) ListAvailabilityConfigurations ¶
func (b *InMemoryBackend) ListAvailabilityConfigurations( orgID string, maxResults int32, nextToken string, ) ([]*AvailabilityConfiguration, string, error)
ListAvailabilityConfigurations lists availability configurations for an org.
func (*InMemoryBackend) ListGroupMembers ¶
func (b *InMemoryBackend) ListGroupMembers( orgID, groupID string, maxResults int32, nextToken string, ) ([]*Member, string, error)
ListGroupMembers returns members of a group.
func (*InMemoryBackend) ListGroups ¶
func (b *InMemoryBackend) ListGroups( orgID string, filter *GroupFilter, maxResults int32, nextToken string, ) ([]*GroupSummary, string, error)
ListGroups returns a paginated list of groups, optionally narrowed by filter (see GroupFilter -- mirrors ListGroupsInput.Filters).
func (*InMemoryBackend) ListGroupsForEntity ¶
func (b *InMemoryBackend) ListGroupsForEntity( orgID, entityID, groupNamePrefix string, maxResults int32, nextToken string, ) ([]*GroupSummary, string, error)
ListGroupsForEntity returns groups containing the given entity, optionally narrowed to group names starting with groupNamePrefix (mirrors ListGroupsForEntityInput.Filters.GroupNamePrefix, the ListGroupsForEntity operation's single filter dimension).
func (*InMemoryBackend) ListImpersonationRoles ¶
func (b *InMemoryBackend) ListImpersonationRoles( orgID string, maxResults int32, nextToken string, ) ([]*ImpersonationRole, string, error)
ListImpersonationRoles returns impersonation roles.
func (*InMemoryBackend) ListMailDomains ¶
func (b *InMemoryBackend) ListMailDomains( orgID string, maxResults int32, nextToken string, ) ([]*MailDomainSummary, string, error)
ListMailDomains returns a paginated list of mail domains.
func (*InMemoryBackend) ListMailboxExportJobs ¶
func (b *InMemoryBackend) ListMailboxExportJobs( orgID string, maxResults int32, nextToken string, ) ([]*MailboxExportJob, string, error)
ListMailboxExportJobs lists mailbox export jobs for an org.
func (*InMemoryBackend) ListMailboxPermissions ¶
func (b *InMemoryBackend) ListMailboxPermissions( orgID, entityID string, maxResults int32, nextToken string, ) ([]*Permission, string, error)
ListMailboxPermissions returns mailbox permissions for an entity.
func (*InMemoryBackend) ListMobileDeviceAccessOverrides ¶
func (b *InMemoryBackend) ListMobileDeviceAccessOverrides( orgID, userID, deviceID string, maxResults int32, nextToken string, ) ([]*MobileDeviceAccessOverride, string, error)
ListMobileDeviceAccessOverrides lists overrides filtered by userID and/or deviceID.
func (*InMemoryBackend) ListMobileDeviceAccessRules ¶
func (b *InMemoryBackend) ListMobileDeviceAccessRules( orgID string, ) ([]*MobileDeviceAccessRule, error)
ListMobileDeviceAccessRules lists all mobile device access rules for an org.
func (*InMemoryBackend) ListOrganizations ¶
func (b *InMemoryBackend) ListOrganizations( ctx context.Context, maxResults int32, nextToken string, ) ([]*OrgSummary, string, error)
ListOrganizations returns a paginated list of organizations.
func (*InMemoryBackend) ListPersonalAccessTokens ¶
func (b *InMemoryBackend) ListPersonalAccessTokens( orgID, userID string, maxResults int32, nextToken string, ) ([]*PersonalAccessToken, string, error)
ListPersonalAccessTokens lists personal access tokens, optionally filtered by userID.
func (*InMemoryBackend) ListResourceDelegates ¶
func (b *InMemoryBackend) ListResourceDelegates( orgID, resourceID string, maxResults int32, nextToken string, ) ([]*Delegate, string, error)
ListResourceDelegates returns delegates of a resource.
func (*InMemoryBackend) ListResources ¶
func (b *InMemoryBackend) ListResources( orgID string, filter *ResourceFilter, maxResults int32, nextToken string, ) ([]*ResourceSummary, string, error)
ListResources returns a paginated list of resources, optionally narrowed by filter (see ResourceFilter -- mirrors ListResourcesInput.Filters).
func (*InMemoryBackend) ListTagsForResource ¶
func (b *InMemoryBackend) ListTagsForResource(resourceARN string) ([]Tag, error)
ListTagsForResource returns tags for a resource.
func (*InMemoryBackend) ListUsers ¶
func (b *InMemoryBackend) ListUsers( orgID string, filter *UserFilter, maxResults int32, nextToken string, ) ([]*UserSummary, string, error)
ListUsers returns a paginated list of users, optionally narrowed by filter (see UserFilter -- mirrors ListUsersInput.Filters; a nil filter matches every user, matching the real API's "no Filters" behavior).
func (*InMemoryBackend) PutAccessControlRule ¶
func (b *InMemoryBackend) PutAccessControlRule( orgID string, params PutAccessControlRuleParams, ) (*AccessControlRule, error)
PutAccessControlRule creates or updates an access control rule.
func (*InMemoryBackend) PutEmailMonitoringConfiguration ¶
func (b *InMemoryBackend) PutEmailMonitoringConfiguration( orgID, roleARN, logGroupARN string, ) error
PutEmailMonitoringConfiguration sets email monitoring config for an org.
func (*InMemoryBackend) PutIdentityProviderConfiguration ¶
func (b *InMemoryBackend) PutIdentityProviderConfiguration( orgID, authMode, identityCenterAppARN, identityCenterInstanceARN, patStatus string, patLifetimeDays int32, ) error
PutIdentityProviderConfiguration creates or updates IdP configuration.
func (*InMemoryBackend) PutInboundDmarcSettings ¶
func (b *InMemoryBackend) PutInboundDmarcSettings(orgID string, enforced bool) error
PutInboundDmarcSettings sets inbound DMARC enforcement for an org.
func (*InMemoryBackend) PutMailboxPermissions ¶
func (b *InMemoryBackend) PutMailboxPermissions( orgID, entityID, granteeID string, perms []string, ) error
PutMailboxPermissions creates or updates mailbox permissions.
func (*InMemoryBackend) PutMobileDeviceAccessOverride ¶
func (b *InMemoryBackend) PutMobileDeviceAccessOverride( orgID, userID, deviceID, effect, description string, ) error
PutMobileDeviceAccessOverride creates or updates a per-user per-device override.
func (*InMemoryBackend) PutRetentionPolicy ¶
func (b *InMemoryBackend) PutRetentionPolicy( orgID, id, name, description string, folderConfigurations []*FolderConfiguration, ) error
PutRetentionPolicy creates or updates a retention policy for an org.
func (*InMemoryBackend) Region ¶
func (b *InMemoryBackend) Region() string
Region returns the configured region.
func (*InMemoryBackend) RegisterMailDomain ¶
func (b *InMemoryBackend) RegisterMailDomain(orgID, domainName string) error
RegisterMailDomain registers a domain with the organization.
func (*InMemoryBackend) RegisterToWorkMail ¶
func (b *InMemoryBackend) RegisterToWorkMail(orgID, entityID, email string) error
RegisterToWorkMail assigns an email address to a user/group/resource.
func (*InMemoryBackend) ResetPassword ¶
func (b *InMemoryBackend) ResetPassword(orgID, userID, _ string) error
ResetPassword updates the user's password (simulated — no-op).
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore deserializes backend state from a snapshot. It implements persistence.Persistable.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serializes the backend state to JSON. It implements persistence.Persistable.
func (*InMemoryBackend) StartMailboxExportJob ¶
func (b *InMemoryBackend) StartMailboxExportJob( orgID, entityID, description, roleARN, kmsKeyARN, s3BucketName, s3Prefix string, ) (*MailboxExportJob, error)
StartMailboxExportJob starts a mailbox export job.
func (*InMemoryBackend) TagResource ¶
func (b *InMemoryBackend) TagResource(resourceARN string, tags []Tag) error
TagResource adds tags to a resource.
func (*InMemoryBackend) TestAvailabilityConfiguration ¶
func (b *InMemoryBackend) TestAvailabilityConfiguration( orgID, domainName string, ) (bool, string, error)
TestAvailabilityConfiguration simulates testing a configuration.
func (*InMemoryBackend) UntagResource ¶
func (b *InMemoryBackend) UntagResource(resourceARN string, tagKeys []string) error
UntagResource removes tags from a resource.
func (*InMemoryBackend) UpdateAvailabilityConfiguration ¶
func (b *InMemoryBackend) UpdateAvailabilityConfiguration( orgID, domainName string, ewsProvider *AvailabilityEwsProvider, lambdaARN string, ) error
UpdateAvailabilityConfiguration updates an existing availability configuration.
func (*InMemoryBackend) UpdateDefaultMailDomain ¶
func (b *InMemoryBackend) UpdateDefaultMailDomain(orgID, domainName string) error
UpdateDefaultMailDomain changes the default mail domain.
func (*InMemoryBackend) UpdateGroup ¶
func (b *InMemoryBackend) UpdateGroup(orgID, entityID string, hidden bool) error
UpdateGroup updates a group.
func (*InMemoryBackend) UpdateImpersonationRole ¶
func (b *InMemoryBackend) UpdateImpersonationRole( orgID, roleID, name, roleType, description string, rules []ImpersonationRule, ) error
UpdateImpersonationRole updates an impersonation role.
func (*InMemoryBackend) UpdateMailboxQuota ¶
func (b *InMemoryBackend) UpdateMailboxQuota(orgID, userID string, quota int32) error
UpdateMailboxQuota updates the mailbox quota for a user.
func (*InMemoryBackend) UpdateMobileDeviceAccessRule ¶
func (b *InMemoryBackend) UpdateMobileDeviceAccessRule( orgID, ruleID, name, effect, description string, deviceModels, notDeviceModels, deviceTypes, notDeviceTypes, deviceOperatingSystems, notDeviceOperatingSystems, deviceUserAgents, notDeviceUserAgents []string, ) error
UpdateMobileDeviceAccessRule updates a mobile device access rule.
func (*InMemoryBackend) UpdatePrimaryEmailAddress ¶
func (b *InMemoryBackend) UpdatePrimaryEmailAddress(orgID, entityID, email string) error
UpdatePrimaryEmailAddress updates the primary email of an entity.
func (*InMemoryBackend) UpdateResource ¶
func (b *InMemoryBackend) UpdateResource(orgID, entityID, name, description string) error
UpdateResource updates resource fields.
func (*InMemoryBackend) UpdateUser ¶
func (b *InMemoryBackend) UpdateUser(orgID, entityID string, params UpdateUserParams) error
UpdateUser updates a user's profile fields. Empty strings and a nil HiddenFromGlobalAddressList leave the corresponding field unchanged, matching UpdateUserInput's optional-field semantics (see UpdateUserParams).
type MailDomain ¶
type MailDomain struct {
DomainName string
OwnershipVerificationStatus string
MxRecord string
// DkimVerificationStatus mirrors GetMailDomainOutput.DkimVerificationStatus
// (types.DnsRecordVerificationStatus: PENDING/VERIFIED/FAILED).
DkimVerificationStatus string
Records []DNSRecord
IsDefault bool
IsTestDomain bool
// contains filtered or unexported fields
}
MailDomain represents a registered mail domain.
type MailDomainSummary ¶
MailDomainSummary is a summary of a registered mail domain.
type MailboxDetails ¶
MailboxDetails holds mailbox quota/storage info.
type MailboxExportJob ¶
type MailboxExportJob struct {
StartTime time.Time
EndTime time.Time
S3Prefix string
RoleARN string
KmsKeyARN string
S3BucketName string
JobID string
S3Path string
State string
ErrorInfo string
Description string
EntityID string
EstimatedProgress int32
// contains filtered or unexported fields
}
MailboxExportJob holds a mailbox export job.
type Member ¶
type Member struct {
EnabledDate time.Time
DisabledDate time.Time
MemberID string
Name string
State string
MemberType string
}
Member represents a group member.
type MobileDeviceAccessOverride ¶
type MobileDeviceAccessOverride struct {
DateCreated time.Time
DateModified time.Time
UserID string
DeviceID string
Effect string
Description string
// contains filtered or unexported fields
}
MobileDeviceAccessOverride holds a per-user per-device override.
type MobileDeviceAccessRule ¶
type MobileDeviceAccessRule struct {
DateModified time.Time
DateCreated time.Time
RuleID string
Name string
Effect string
Description string
DeviceModels []string
DeviceTypes []string
NotDeviceTypes []string
DeviceOperatingSystems []string
NotDeviceOperatingSystems []string
DeviceUserAgents []string
NotDeviceUserAgents []string
NotDeviceModels []string
// contains filtered or unexported fields
}
MobileDeviceAccessRule holds a mobile device access rule.
type MobileDeviceMatchedRule ¶
MobileDeviceMatchedRule is a matched rule summary.
type OrgSummary ¶
type OrgSummary struct {
OrgID string
Alias string
DefaultMailDomain string
State string
ErrorMessage string
}
OrgSummary is a summary of a WorkMail organization.
type Organization ¶
type Organization struct {
CreatedAt time.Time
CompletedDate time.Time
OrgID string
Alias string
ARN string
State string
DirectoryID string
DirectoryType string
DefaultMailDomain string
ErrorMessage string
Region string
// MigrationAdmin mirrors DescribeOrganizationOutput.MigrationAdmin. The
// real WorkMail API exposes no operation (in this SDK's surface) that
// ever sets it -- it is populated out-of-band by an Exchange
// interoperability/migration flow this backend does not simulate -- so
// it is always empty here, which correctly matches every organization
// that never configured migration.
MigrationAdmin string
}
Organization represents a WorkMail organization.
type Permission ¶
type Permission struct {
GranteeID string
GranteeType string
Permissions []string
// contains filtered or unexported fields
}
Permission represents a mailbox permission.
type PersonalAccessToken ¶
type PersonalAccessToken struct {
DateCreated time.Time
DateLastUsed time.Time
ExpiresTime time.Time
TokenID string
UserID string
Name string
Scopes []string
// contains filtered or unexported fields
}
PersonalAccessToken holds PAT metadata.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for Amazon WorkMail.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init creates a WorkMail backend and handler.
type PutAccessControlRuleParams ¶ added in v1.2.0
type PutAccessControlRuleParams struct {
Name string
Effect string
Description string
IPRanges []string
NotIPRanges []string
Actions []string
NotActions []string
UserIDs []string
NotUserIDs []string
ImpersonationRoleIDs []string
NotImpersonationRoleIDs []string
}
PutAccessControlRuleParams mirrors aws-sdk-go-v2/service/workmail's PutAccessControlRuleInput (minus the required Name/Effect/Description/ OrganizationId, threaded as explicit args).
type Resource ¶
type Resource struct {
CreatedAt time.Time
EnabledDate time.Time
DisabledDate time.Time
ResourceID string
Name string
Email string
ResourceType string
Description string
State string
ARN string
// contains filtered or unexported fields
}
Resource represents a WorkMail resource.
type ResourceFilter ¶ added in v1.2.0
ResourceFilter mirrors aws-sdk-go-v2/service/workmail/types.ListResourcesFilters.
type ResourceSummary ¶
type ResourceSummary struct {
ResourceID string
Name string
Email string
ResourceType string
State string
Description string
}
ResourceSummary is a summary of a WorkMail resource.
type RetentionPolicy ¶
type RetentionPolicy struct {
ID string
Name string
Description string
FolderConfigurations []*FolderConfiguration
// contains filtered or unexported fields
}
RetentionPolicy holds a retention policy.
type StorageBackend ¶
type StorageBackend interface {
// Organizations
CreateOrganization(ctx context.Context, alias string, domains []string) (*Organization, error)
DescribeOrganization(orgID string) (*Organization, error)
DeleteOrganization(orgID string, deleteDirectory bool) error
ListOrganizations(ctx context.Context, maxResults int32, nextToken string) ([]*OrgSummary, string, error)
// Users
CreateUser(orgID, name string, params CreateUserParams) (*User, error)
DescribeUser(orgID, entityID string) (*User, error)
UpdateUser(orgID, entityID string, params UpdateUserParams) error
DeleteUser(orgID, entityID string) error
ListUsers(orgID string, filter *UserFilter, maxResults int32, nextToken string) ([]*UserSummary, string, error)
RegisterToWorkMail(orgID, entityID, email string) error
DeregisterFromWorkMail(orgID, entityID string) error
ResetPassword(orgID, userID, password string) error
GetMailboxDetails(orgID, userID string) (*MailboxDetails, error)
UpdateMailboxQuota(orgID, userID string, quota int32) error
UpdatePrimaryEmailAddress(orgID, entityID, email string) error
// Groups
CreateGroup(orgID, name string, hidden bool) (*Group, error)
DescribeGroup(orgID, entityID string) (*Group, error)
UpdateGroup(orgID, entityID string, hidden bool) error
DeleteGroup(orgID, entityID string) error
ListGroups(
orgID string, filter *GroupFilter, maxResults int32, nextToken string,
) ([]*GroupSummary, string, error)
AssociateMemberToGroup(orgID, groupID, memberID string) error
DisassociateMemberFromGroup(orgID, groupID, memberID string) error
ListGroupMembers(orgID, groupID string, maxResults int32, nextToken string) ([]*Member, string, error)
ListGroupsForEntity(
orgID, entityID, groupNamePrefix string, maxResults int32, nextToken string,
) ([]*GroupSummary, string, error)
// Resources
CreateResource(orgID, name, resourceType, description string) (*Resource, error)
DescribeResource(orgID, entityID string) (*Resource, error)
UpdateResource(orgID, entityID, name, description string) error
DeleteResource(orgID, entityID string) error
ListResources(
orgID string, filter *ResourceFilter, maxResults int32, nextToken string,
) ([]*ResourceSummary, string, error)
AssociateDelegateToResource(orgID, resourceID, entityID string) error
DisassociateDelegateFromResource(orgID, resourceID, entityID string) error
ListResourceDelegates(orgID, resourceID string, maxResults int32, nextToken string) ([]*Delegate, string, error)
// Aliases
CreateAlias(orgID, entityID, alias string) error
DeleteAlias(orgID, entityID, alias string) error
ListAliases(orgID, entityID string, maxResults int32, nextToken string) ([]string, string, error)
// Mailbox permissions
PutMailboxPermissions(orgID, entityID, granteeID string, perms []string) error
DeleteMailboxPermissions(orgID, entityID, granteeID string) error
ListMailboxPermissions(orgID, entityID string, maxResults int32, nextToken string) ([]*Permission, string, error)
// Mail domains
RegisterMailDomain(orgID, domainName string) error
DeregisterMailDomain(orgID, domainName string) error
GetMailDomain(orgID, domainName string) (*MailDomain, error)
ListMailDomains(orgID string, maxResults int32, nextToken string) ([]*MailDomainSummary, string, error)
UpdateDefaultMailDomain(orgID, domainName string) error
// Access control rules
PutAccessControlRule(orgID string, params PutAccessControlRuleParams) (*AccessControlRule, error)
DeleteAccessControlRule(orgID, name string) error
GetAccessControlEffect(
orgID, ipAddr, action, userID, impersonationRoleID string,
) (string, []string, error)
ListAccessControlRules(orgID string) ([]*AccessControlRule, error)
// Impersonation roles
CreateImpersonationRole(
orgID, name, roleType, description string,
rules []ImpersonationRule,
) (*ImpersonationRole, error)
GetImpersonationRole(orgID, roleID string) (*ImpersonationRole, error)
UpdateImpersonationRole(orgID, roleID, name, roleType, description string, rules []ImpersonationRule) error
DeleteImpersonationRole(orgID, roleID string) error
ListImpersonationRoles(orgID string, maxResults int32, nextToken string) ([]*ImpersonationRole, string, error)
// Tags
TagResource(resourceARN string, tags []Tag) error
UntagResource(resourceARN string, tagKeys []string) error
ListTagsForResource(resourceARN string) ([]Tag, error)
// Describe entity (user, group, or resource by email or ID)
DescribeEntity(orgID, email string) (*EntityDescription, error)
// Availability configurations
CreateAvailabilityConfiguration(
orgID, domainName string,
ewsProvider *AvailabilityEwsProvider,
lambdaARN string,
) (*AvailabilityConfiguration, error)
DeleteAvailabilityConfiguration(orgID, domainName string) error
UpdateAvailabilityConfiguration(
orgID, domainName string,
ewsProvider *AvailabilityEwsProvider,
lambdaARN string,
) error
ListAvailabilityConfigurations(
orgID string,
maxResults int32,
nextToken string,
) ([]*AvailabilityConfiguration, string, error)
TestAvailabilityConfiguration(orgID, domainName string) (bool, string, error)
// Mobile device access rules
CreateMobileDeviceAccessRule(orgID, name, effect, description string,
deviceModels, notDeviceModels, deviceTypes, notDeviceTypes,
deviceOperatingSystems, notDeviceOperatingSystems, deviceUserAgents, notDeviceUserAgents []string,
) (*MobileDeviceAccessRule, error)
DeleteMobileDeviceAccessRule(orgID, ruleID string) error
UpdateMobileDeviceAccessRule(orgID, ruleID, name, effect, description string,
deviceModels, notDeviceModels, deviceTypes, notDeviceTypes,
deviceOperatingSystems, notDeviceOperatingSystems, deviceUserAgents, notDeviceUserAgents []string,
) error
ListMobileDeviceAccessRules(orgID string) ([]*MobileDeviceAccessRule, error)
GetMobileDeviceAccessEffect(
orgID, deviceType, deviceModel, deviceOS, deviceUserAgent string,
) (string, []*MobileDeviceMatchedRule, error)
// Mobile device access overrides
PutMobileDeviceAccessOverride(orgID, userID, deviceID, effect, description string) error
DeleteMobileDeviceAccessOverride(orgID, userID, deviceID string) error
GetMobileDeviceAccessOverride(orgID, userID, deviceID string) (*MobileDeviceAccessOverride, error)
ListMobileDeviceAccessOverrides(
orgID, userID, deviceID string,
maxResults int32,
nextToken string,
) ([]*MobileDeviceAccessOverride, string, error)
// Email monitoring configuration
PutEmailMonitoringConfiguration(orgID, roleARN, logGroupARN string) error
DeleteEmailMonitoringConfiguration(orgID string) error
DescribeEmailMonitoringConfiguration(orgID string) (*EmailMonitoringConfiguration, error)
// Inbound DMARC settings
PutInboundDmarcSettings(orgID string, enforced bool) error
DescribeInboundDmarcSettings(orgID string) (bool, error)
// Retention policies
PutRetentionPolicy(orgID, id, name, description string, folderConfigurations []*FolderConfiguration) error
DeleteRetentionPolicy(orgID, id string) error
GetDefaultRetentionPolicy(orgID string) (*RetentionPolicy, error)
// Mailbox export jobs
StartMailboxExportJob(
orgID, entityID, description, roleARN, kmsKeyARN, s3BucketName, s3Prefix string,
) (*MailboxExportJob, error)
CancelMailboxExportJob(orgID, jobID string) error
DescribeMailboxExportJob(orgID, jobID string) (*MailboxExportJob, error)
ListMailboxExportJobs(orgID string, maxResults int32, nextToken string) ([]*MailboxExportJob, string, error)
// Identity center applications
CreateIdentityCenterApplication(instanceARN, name string) (string, error)
DeleteIdentityCenterApplication(applicationARN string) error
// Identity provider configuration
PutIdentityProviderConfiguration(
orgID, authMode string,
identityCenterAppARN, identityCenterInstanceARN, patStatus string,
patLifetimeDays int32,
) error
DeleteIdentityProviderConfiguration(orgID string) error
DescribeIdentityProviderConfiguration(orgID string) (*IdentityProviderConfiguration, error)
// Personal access tokens
DeletePersonalAccessToken(orgID, tokenID string) error
GetPersonalAccessTokenMetadata(orgID, tokenID string) (*PersonalAccessToken, error)
ListPersonalAccessTokens(
orgID, userID string,
maxResults int32,
nextToken string,
) ([]*PersonalAccessToken, string, error)
// Impersonation role effect
GetImpersonationRoleEffect(orgID, roleID, targetUser string) (string, string, []*ImpersonationMatchedRule, error)
// Assume impersonation role
AssumeImpersonationRole(orgID, roleID string) (string, int64, error)
AccountID() string
Region() string
Reset()
// Snapshot and Restore implement persistence.Persistable. Handler
// delegates to them (see persistence.go) so cli.go's generic
// setupPersistence picks WorkMail up.
Snapshot(ctx context.Context) []byte
Restore(ctx context.Context, data []byte) error
}
StorageBackend is the interface for WorkMail storage operations.
type UpdateUserParams ¶ added in v1.2.0
type UpdateUserParams struct {
HiddenFromGlobalAddressList *bool
JobTitle string
Telephone string
City string
Company string
Country string
Department string
LastName string
Office string
Initials string
Street string
DisplayName string
ZipCode string
IdentityProviderUserID string
Role string
FirstName string
}
UpdateUserParams mirrors aws-sdk-go-v2/service/workmail's UpdateUserInput (minus the required OrganizationId/UserId). A nil *bool leaves HiddenFromGlobalAddressList unchanged, matching the real API's optional pointer semantics; empty strings likewise leave their field unchanged (none of these profile fields has a documented way to be cleared back to empty via UpdateUser).
type User ¶
type User struct {
CreatedAt time.Time
EnabledDate time.Time
DisabledDate time.Time
// MailboxProvisionedDate/MailboxDeprovisionedDate mirror
// DescribeUserOutput's fields of the same name. Real WorkMail sets these
// alongside EnabledDate/DisabledDate when the mailbox itself is
// created/removed (RegisterToWorkMail/DeregisterFromWorkMail), so this
// backend mirrors EnabledDate/DisabledDate at those same call sites (see
// RegisterToWorkMail/DeregisterFromWorkMail in users.go).
MailboxProvisionedDate time.Time
MailboxDeprovisionedDate time.Time
UserID string
Name string
Email string
DisplayName string
FirstName string
LastName string
Role string
State string
ARN string
// The following mirror DescribeUserOutput's/UpdateUserInput's optional
// profile fields -- none affect entity identity or state transitions,
// they are plain profile metadata settable via CreateUser/UpdateUser and
// surfaced via DescribeUser.
City string
Company string
Country string
Department string
Initials string
JobTitle string
Office string
Street string
Telephone string
ZipCode string
IdentityProviderIdentityStoreID string
IdentityProviderUserID string
HiddenFromGlobalAddressList bool
// contains filtered or unexported fields
}
User represents a WorkMail user.
type UserFilter ¶ added in v1.2.0
type UserFilter struct {
DisplayNamePrefix string
PrimaryEmailPrefix string
State string
UsernamePrefix string
IdentityProviderUserIDPrefix string
}
UserFilter mirrors aws-sdk-go-v2/service/workmail/types.ListUsersFilters, the ListUsersInput.Filters wire shape. A nil field/zero value means "no filter on this dimension" -- matches every value.
Source Files
¶
- access_control.go
- aliases.go
- availability_config.go
- delegates.go
- email_monitoring.go
- entities.go
- errors.go
- groups.go
- handler.go
- handler_access_control.go
- handler_aliases.go
- handler_availability_config.go
- handler_delegates.go
- handler_email_monitoring.go
- handler_entities.go
- handler_groups.go
- handler_identity.go
- handler_impersonation.go
- handler_inbound_dmarc.go
- handler_mail_domains.go
- handler_mailboxes.go
- handler_mobile_device_access.go
- handler_organizations.go
- handler_personal_access_tokens.go
- handler_resources.go
- handler_retention_policy.go
- handler_tags.go
- handler_users.go
- identity.go
- impersonation.go
- inbound_dmarc.go
- interfaces.go
- mail_domains.go
- mailboxes.go
- mobile_device_access.go
- models.go
- organizations.go
- persistence.go
- personal_access_tokens.go
- provider.go
- resources.go
- retention_policy.go
- store.go
- store_setup.go
- tags.go
- users.go