Documentation
¶
Index ¶
- Variables
- type ADAssessmentConfiguration
- type ADAssessmentInfo
- type CAEnrollmentPolicy
- type CertDetail
- type CertInfo
- type ClientAuthInfo
- type ClientAuthenticationType
- type ComputerInfo
- type ConditionalForwarder
- type ConnectSettingsInput
- type Directory
- type DirectoryConnectSettingsDescription
- type DirectoryDataAccessStatus
- type DirectoryEdition
- type DirectoryLimits
- type DirectorySetting
- type DirectorySize
- type DirectoryStage
- type DirectoryType
- type DirectoryVpcSettings
- type DomainController
- type EventTopic
- type Handler
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *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) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Snapshot(_ context.Context) []byte
- type HybridADUpdateEntry
- type HybridSettingsDescription
- type InMemoryBackend
- func (b *InMemoryBackend) AcceptSharedDirectory(ctx context.Context, sharedDirectoryID string) (string, error)
- func (b *InMemoryBackend) AccountID() string
- func (b *InMemoryBackend) AddIpRoutes(ctx context.Context, directoryID string, routes []IpRoute) error
- func (b *InMemoryBackend) AddRegion(ctx context.Context, directoryID, regionName string, ...) error
- func (b *InMemoryBackend) AddTagsToResource(ctx context.Context, resourceID string, tags []Tag) error
- func (b *InMemoryBackend) BackendSnapshot() []byte
- func (b *InMemoryBackend) CancelSchemaExtension(ctx context.Context, directoryID, schemaExtensionID string) error
- func (b *InMemoryBackend) ConnectDirectory(ctx context.Context, name, shortName, description, _ string, ...) (*Directory, error)
- func (b *InMemoryBackend) CreateAlias(ctx context.Context, directoryID, alias string) error
- func (b *InMemoryBackend) CreateComputer(ctx context.Context, directoryID, computerName, _ string) (*ComputerInfo, error)
- func (b *InMemoryBackend) CreateConditionalForwarder(ctx context.Context, directoryID, remoteDomainName string, ...) error
- func (b *InMemoryBackend) CreateDirectory(ctx context.Context, name, shortName, description, _ string, ...) (*Directory, error)
- func (b *InMemoryBackend) CreateHybridAD(ctx context.Context, assessmentID, secretArn string, tags []Tag) (*Directory, error)
- func (b *InMemoryBackend) CreateLogSubscription(ctx context.Context, directoryID, logGroupName string) error
- func (b *InMemoryBackend) CreateMicrosoftAD(ctx context.Context, name, shortName, description, _ string, ...) (*Directory, error)
- func (b *InMemoryBackend) CreateSnapshot(ctx context.Context, directoryID, name string) (*Snapshot, error)
- func (b *InMemoryBackend) CreateTrust(ctx context.Context, ...) (string, error)
- func (b *InMemoryBackend) DeleteADAssessment(ctx context.Context, directoryID, assessmentID string) error
- func (b *InMemoryBackend) DeleteConditionalForwarder(ctx context.Context, directoryID, remoteDomainName string) error
- func (b *InMemoryBackend) DeleteDirectory(ctx context.Context, directoryID string) error
- func (b *InMemoryBackend) DeleteLogSubscription(ctx context.Context, directoryID string) error
- func (b *InMemoryBackend) DeleteSnapshot(ctx context.Context, snapshotID string) error
- func (b *InMemoryBackend) DeleteTrust(ctx context.Context, trustID string) (string, error)
- func (b *InMemoryBackend) DeregisterCertificate(ctx context.Context, directoryID, certID string) error
- func (b *InMemoryBackend) DeregisterEventTopic(ctx context.Context, directoryID, topicName string) error
- func (b *InMemoryBackend) DescribeADAssessment(ctx context.Context, directoryID, assessmentID string) (*ADAssessmentInfo, error)
- func (b *InMemoryBackend) DescribeCAEnrollmentPolicy(ctx context.Context, directoryID string) (*CAEnrollmentPolicy, error)
- func (b *InMemoryBackend) DescribeCertificate(ctx context.Context, directoryID, certID string) (*CertDetail, error)
- func (b *InMemoryBackend) DescribeClientAuthenticationSettings(ctx context.Context, directoryID, authType string, limit int32, ...) ([]ClientAuthInfo, string, error)
- func (b *InMemoryBackend) DescribeConditionalForwarders(ctx context.Context, directoryID string, remoteDomainNames []string) ([]ConditionalForwarder, error)
- func (b *InMemoryBackend) DescribeDirectories(ctx context.Context, directoryIDs []string, limit int32, nextToken string) ([]*Directory, string, error)
- func (b *InMemoryBackend) DescribeDirectoryDataAccess(ctx context.Context, directoryID string) (*DirectoryDataAccessStatus, error)
- func (b *InMemoryBackend) DescribeDomainControllers(ctx context.Context, directoryID string, domainControllerIDs []string, ...) ([]DomainController, string, error)
- func (b *InMemoryBackend) DescribeEventTopics(ctx context.Context, directoryID string, topicNames []string) ([]EventTopic, error)
- func (b *InMemoryBackend) DescribeHybridADUpdate(ctx context.Context, directoryID, updateType string) ([]HybridADUpdateEntry, []HybridADUpdateEntry, error)
- func (b *InMemoryBackend) DescribeLDAPSSettings(ctx context.Context, directoryID, ldapsType string, limit int32, ...) ([]LDAPSSetting, string, error)
- func (b *InMemoryBackend) DescribeRegions(ctx context.Context, directoryID, regionName, nextToken string) ([]RegionDescription, string, error)
- func (b *InMemoryBackend) DescribeSettings(ctx context.Context, directoryID, status, nextToken string) ([]SettingEntry, string, error)
- func (b *InMemoryBackend) DescribeSharedDirectories(ctx context.Context, ownerDirID string, sharedDirIDs []string, limit int32, ...) ([]SharedDirInfo, string, error)
- func (b *InMemoryBackend) DescribeSnapshots(ctx context.Context, directoryID string, snapshotIDs []string, limit int32, ...) ([]*Snapshot, string, error)
- func (b *InMemoryBackend) DescribeTrusts(ctx context.Context, directoryID string, trustIDs []string, limit int32, ...) ([]TrustInfo, string, error)
- func (b *InMemoryBackend) DescribeUpdateDirectory(ctx context.Context, directoryID, updateType, nextToken string) ([]UpdateInfoEntry, string, error)
- func (b *InMemoryBackend) DisableCAEnrollmentPolicy(ctx context.Context, directoryID string) error
- func (b *InMemoryBackend) DisableClientAuthentication(ctx context.Context, directoryID, authType string) error
- func (b *InMemoryBackend) DisableDirectoryDataAccess(ctx context.Context, directoryID string) error
- func (b *InMemoryBackend) DisableLDAPS(ctx context.Context, directoryID, ldapsType string) error
- func (b *InMemoryBackend) DisableRadius(ctx context.Context, directoryID string) error
- func (b *InMemoryBackend) DisableSso(ctx context.Context, directoryID string) error
- func (b *InMemoryBackend) EnableCAEnrollmentPolicy(ctx context.Context, directoryID string) error
- func (b *InMemoryBackend) EnableClientAuthentication(ctx context.Context, directoryID, authType string) error
- func (b *InMemoryBackend) EnableDirectoryDataAccess(ctx context.Context, directoryID string) error
- func (b *InMemoryBackend) EnableLDAPS(ctx context.Context, directoryID, ldapsType string) error
- func (b *InMemoryBackend) EnableRadius(ctx context.Context, directoryID string, settings RadiusSettingsInput) error
- func (b *InMemoryBackend) EnableSso(ctx context.Context, directoryID string) error
- func (b *InMemoryBackend) GetDirectoryLimits(ctx context.Context) *DirectoryLimits
- func (b *InMemoryBackend) GetSnapshotLimits(ctx context.Context, directoryID string) (*SnapshotLimits, error)
- func (b *InMemoryBackend) ListADAssessments(ctx context.Context, directoryID string, limit int32, nextToken string) ([]ADAssessmentInfo, string, error)
- func (b *InMemoryBackend) ListCertificates(ctx context.Context, directoryID string, limit int32, nextToken string) ([]CertInfo, string, error)
- func (b *InMemoryBackend) ListIpRoutes(ctx context.Context, directoryID string, limit int32, nextToken string) ([]IpRoute, string, error)
- func (b *InMemoryBackend) ListLogSubscriptions(ctx context.Context, directoryID string, limit int32, nextToken string) ([]LogSubscription, string, error)
- func (b *InMemoryBackend) ListSchemaExtensions(ctx context.Context, directoryID string, limit int32, nextToken string) ([]SchemaExtension, string, error)
- func (b *InMemoryBackend) ListTagsForResource(ctx context.Context, resourceID string, limit int32, nextToken string) ([]Tag, string, error)
- func (b *InMemoryBackend) Region() string
- func (b *InMemoryBackend) RegisterCertificate(ctx context.Context, directoryID, certData, certType string) (string, error)
- func (b *InMemoryBackend) RegisterEventTopic(ctx context.Context, directoryID, topicName string) error
- func (b *InMemoryBackend) RejectSharedDirectory(ctx context.Context, sharedDirectoryID string) (string, error)
- func (b *InMemoryBackend) RemoveIpRoutes(ctx context.Context, directoryID string, cidrIPs []string) error
- func (b *InMemoryBackend) RemoveRegion(ctx context.Context, directoryID string) error
- func (b *InMemoryBackend) RemoveTagsFromResource(ctx context.Context, resourceID string, tagKeys []string) error
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) ResetUserPassword(ctx context.Context, directoryID, _, _ string) error
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) RestoreFromSnapshot(ctx context.Context, snapshotID string) error
- func (b *InMemoryBackend) ShareDirectory(ctx context.Context, directoryID, shareMethod, shareNotes, targetID string) (string, error)
- func (b *InMemoryBackend) StartADAssessment(ctx context.Context, directoryID string, cfg *ADAssessmentConfiguration) (string, error)
- func (b *InMemoryBackend) StartSchemaExtension(ctx context.Context, directoryID, description, _ string) (string, error)
- func (b *InMemoryBackend) UnshareDirectory(ctx context.Context, directoryID, targetID string) (string, error)
- func (b *InMemoryBackend) UpdateConditionalForwarder(ctx context.Context, directoryID, remoteDomainName string, ...) error
- func (b *InMemoryBackend) UpdateDirectorySetup(ctx context.Context, directoryID, updateType string, _ bool) error
- func (b *InMemoryBackend) UpdateHybridAD(ctx context.Context, directoryID, adminAccountSecretArn string, ...) (string, error)
- func (b *InMemoryBackend) UpdateNumberOfDomainControllers(ctx context.Context, directoryID string, desiredNumber int32) error
- func (b *InMemoryBackend) UpdateRadius(ctx context.Context, directoryID string, settings RadiusSettingsInput) error
- func (b *InMemoryBackend) UpdateSettings(ctx context.Context, directoryID string, settings []DirectorySetting) (string, error)
- func (b *InMemoryBackend) UpdateTrust(ctx context.Context, trustID, selectiveAuth string) (string, error)
- func (b *InMemoryBackend) VerifyTrust(ctx context.Context, trustID string) (string, error)
- type IpRoute
- type LDAPSSetting
- type LDAPSType
- type LogSubscription
- type NetworkType
- type OSVersion
- type OwnerDirectoryDescription
- type Provider
- type RadiusInfo
- type RadiusSettingsDescription
- type RadiusSettingsInput
- type RadiusStatus
- type RegionDescription
- type RegionsInfo
- type SchemaExtension
- type SelectiveAuth
- type SettingEntry
- type ShareMethod
- type ShareStatus
- type SharedDirInfo
- type Snapshot
- type SnapshotLimits
- type SnapshotStatus
- type SnapshotType
- type StorageBackend
- type Tag
- type TrustDirection
- type TrustInfo
- type TrustType
- type UpdateInfoEntry
- type UpdateType
Constants ¶
This section is empty.
Variables ¶
var ( // ErrDirectoryNotFound is returned when a directory does not exist. ErrDirectoryNotFound = awserr.New(errEntityNotExistsException, awserr.ErrNotFound) // ErrSnapshotNotFound is returned when a snapshot does not exist. ErrSnapshotNotFound = awserr.New(errEntityNotExistsException, awserr.ErrNotFound) // ErrAliasAlreadyExists is returned when the alias is already taken. ErrAliasAlreadyExists = awserr.New(errEntityAlreadyExistsException, awserr.ErrAlreadyExists) // ErrInvalidParameter is returned on invalid input. ErrInvalidParameter = awserr.New(errInvalidParameterException, awserr.ErrInvalidParameter) // ErrDirectoryLimitExceeded is returned when the directory limit for the region is reached. ErrDirectoryLimitExceeded = awserr.New("DirectoryLimitExceededException", awserr.ErrConflict) // ErrSnapshotLimitExceeded is returned when the manual snapshot limit for a directory is reached. ErrSnapshotLimitExceeded = awserr.New("SnapshotLimitExceededException", awserr.ErrConflict) // ErrUnsupportedOperation is returned when an operation is not supported by the directory type. ErrUnsupportedOperation = awserr.New("UnsupportedOperationException", awserr.ErrConflict) // ErrTrustNotFound is returned when a trust does not exist. ErrTrustNotFound = awserr.New(errEntityNotExistsException, awserr.ErrNotFound) // ErrCertNotFound is returned when a certificate does not exist. ErrCertNotFound = awserr.New(errEntityNotExistsException, awserr.ErrNotFound) // ErrConditionalForwarderNotFound is returned when a conditional forwarder does not exist. ErrConditionalForwarderNotFound = awserr.New(errEntityNotExistsException, awserr.ErrNotFound) // ErrSchemaExtensionNotFound is returned when a schema extension does not exist. ErrSchemaExtensionNotFound = awserr.New(errEntityNotExistsException, awserr.ErrNotFound) ErrSharedDirectoryNotFound = awserr.New(errEntityNotExistsException, awserr.ErrNotFound) // ErrAssessmentNotFound is returned when an AD assessment does not exist. ErrAssessmentNotFound = awserr.New(errEntityNotExistsException, awserr.ErrNotFound) // ErrInvalidCertificate is returned when CertificateData is not a parseable PEM certificate. ErrInvalidCertificate = awserr.New("InvalidCertificateException", awserr.ErrInvalidParameter) )
var ErrNilAppContext = errors.New("directoryservice: nil app context")
ErrNilAppContext is returned when Init is called with a nil AppContext.
Functions ¶
This section is empty.
Types ¶
type ADAssessmentConfiguration ¶ added in v1.2.0
type ADAssessmentConfiguration struct {
DNSName string
VPCID string
CustomerDNSIPs []string
InstanceIDs []string
SecurityGroupIDs []string
SubnetIDs []string
}
ADAssessmentConfiguration mirrors the real, optional StartADAssessmentInput.AssessmentConfiguration (types.AssessmentConfiguration). When a caller supplies AssessmentConfiguration at all, DNSName/CustomerDNSIPs/ InstanceIDs/VPCID/SubnetIDs are required members (matching the real SDK's validateAssessmentConfiguration); SecurityGroupIDs is optional.
type ADAssessmentInfo ¶
type ADAssessmentInfo struct {
StartTime time.Time
LastUpdateDateTime time.Time
AssessmentID string
DirectoryID string
Status string
AssessType string
Region string
DNSName string
VPCID string
StatusCode string
StatusReason string
Version string
CustomerDNSIPs []string
InstanceIDs []string
SecurityGroupIDs []string
SubnetIDs []string
}
ADAssessmentInfo domain type for both DescribeADAssessment (full Assessment shape) and ListADAssessments (AssessmentSummary shape, a strict subset -- see handler_ad_assessments.go for which fields each op actually puts on the wire). DNSName/CustomerDNSIPs/InstanceIDs/SecurityGroupIDs/VPCID/SubnetIDs come from the real, optional StartADAssessmentInput.AssessmentConfiguration (types.AssessmentConfiguration) when the caller supplies it; they are empty for assessments started without one (e.g. UpdateHybridAD's internally-triggered assessment, which has no AssessmentConfiguration input in the real API either). StatusCode/StatusReason/Version are real Assessment members this backend cannot honestly populate: AWS documents them as assessment-engine-internal output (a detailed status code, a human-readable status/error message, and the assessment-framework version) with no request input and no documented deterministic default -- same class of gap as Directory.OsVersion (see PARITY.md). Left always empty rather than invented.
type CAEnrollmentPolicy ¶
CAEnrollmentPolicy domain type.
type CertDetail ¶
type CertDetail struct {
RegisteredDateTime time.Time
ExpiryDateTime time.Time
CertificateID string
DirectoryID string
CommonName string
CertType string
State string
CertData string
}
CertDetail domain type (for describe).
type CertInfo ¶
type CertInfo struct {
ExpiryDateTime time.Time
CertificateID string
CommonName string
CertType string
State string
}
CertInfo domain type (for list).
type ClientAuthInfo ¶
type ClientAuthInfo struct {
LastUpdatedDateTime time.Time
DirectoryID string
AuthType string
Status string
}
ClientAuthInfo domain type.
type ClientAuthenticationType ¶ added in v1.2.0
type ClientAuthenticationType string
ClientAuthenticationType matches the AWS ClientAuthenticationType enum.
const ( ClientAuthenticationTypeSmartCard ClientAuthenticationType = "SmartCard" ClientAuthenticationTypeSmartCardOrPassword ClientAuthenticationType = "SmartCardOrPassword" )
type ComputerInfo ¶
ComputerInfo is returned by CreateComputer.
type ConditionalForwarder ¶
type ConditionalForwarder struct {
DirectoryID string
RemoteDomainName string
ReplicationScope string
DNSIPAddrs []string
DNSIPv6Addrs []string
}
ConditionalForwarder domain type.
type ConnectSettingsInput ¶ added in v1.2.0
type ConnectSettingsInput struct {
CustomerUserName string
VpcID string
SubnetIDs []string
CustomerDNSIPs []string
CustomerDNSIPsV6 []string
}
ConnectSettingsInput carries the AD Connector settings supplied to ConnectDirectory (matches AWS's DirectoryConnectSettings request shape).
type Directory ¶
type Directory struct {
LaunchTime time.Time
StageLastUpdatedDateTime time.Time
VpcSettings *DirectoryVpcSettings
ConnectSettings *DirectoryConnectSettingsDescription
RegionsInfo *RegionsInfo
RadiusSettings *RadiusSettingsDescription
HybridSettings *HybridSettingsDescription
OwnerDirectoryDescription *OwnerDirectoryDescription
DesiredNumberOfDomainControllers *int32
StageReason *string
DirectoryID string
Name string
ShortName string
Description string
Alias string
AccessURL string
Type DirectoryType
Stage DirectoryStage
Size DirectorySize
Edition DirectoryEdition
NetworkType NetworkType
RadiusStatus RadiusStatus
OsVersion OSVersion
DNSIPAddrs []string
DNSIPv6Addrs []string
SsoEnabled bool
}
Directory represents an AWS Directory Service directory. LaunchTime is first: time.Time's non-pointer prefix reduces GC pointer bytes.
type DirectoryConnectSettingsDescription ¶ added in v1.2.0
type DirectoryConnectSettingsDescription struct {
CustomerUserName string
SecurityGroupID string
VpcID string
SubnetIDs []string
AvailabilityZones []string
ConnectIPs []string
ConnectIPsV6 []string
}
DirectoryConnectSettingsDescription mirrors AWS's DirectoryConnectSettingsDescription, returned only for AD Connector directories. SecurityGroupID and AvailabilityZones are not populated: this backend does not model VPC/subnet-to-AZ or security-group provisioning, so there is no real value to derive them from (see PARITY.md).
type DirectoryDataAccessStatus ¶
DirectoryDataAccessStatus domain type.
type DirectoryEdition ¶
type DirectoryEdition string
DirectoryEdition matches the AWS DirectoryEdition enum.
const ( DirectoryEditionEnterprise DirectoryEdition = "Enterprise" DirectoryEditionStandard DirectoryEdition = "Standard" )
type DirectoryLimits ¶
type DirectoryLimits struct {
CloudOnlyDirectoriesCurrentCount int32
CloudOnlyDirectoriesLimit int32
CloudOnlyMicrosoftADCurrentCount int32
CloudOnlyMicrosoftADLimit int32
ConnectedDirectoriesCurrentCount int32
ConnectedDirectoriesLimit int32
CloudOnlyDirectoriesLimitReached bool
CloudOnlyMicrosoftADLimitReached bool
ConnectedDirectoriesLimitReached bool
}
DirectoryLimits contains directory limit information.
type DirectorySetting ¶
DirectorySetting domain type.
type DirectorySize ¶
type DirectorySize string
DirectorySize matches the AWS DirectorySize enum.
const ( DirectorySizeSmall DirectorySize = "Small" DirectorySizeLarge DirectorySize = "Large" )
type DirectoryStage ¶
type DirectoryStage string
DirectoryStage matches the AWS DirectoryStage enum.
const ( DirectoryStageRequested DirectoryStage = "Requested" DirectoryStageCreating DirectoryStage = "Creating" DirectoryStageActive DirectoryStage = "Active" DirectoryStageDeleted DirectoryStage = "Deleted" DirectoryStageRestoring DirectoryStage = "Restoring" )
type DirectoryType ¶
type DirectoryType string
DirectoryType matches the AWS DirectoryType enum.
const ( DirectoryTypeSimpleAD DirectoryType = "SimpleAD" DirectoryTypeMicrosoftAD DirectoryType = "MicrosoftAD" DirectoryTypeADConnector DirectoryType = "ADConnector" )
type DirectoryVpcSettings ¶
type DirectoryVpcSettings struct {
VpcID string
SubnetIDs []string
SecurityGroupIDs []string
AvailabilityZones []string
}
DirectoryVpcSettings holds VPC networking settings for a directory.
type DomainController ¶
type DomainController struct {
StatusReason *string
LaunchTime time.Time
StatusLastUpdatedDateTime time.Time
ControllerID string
DirectoryID string
Status string
AvailabilityZone string
DNSIPAddr string
DNSIPv6Addr string
SubnetID string
VpcID string
}
DomainController domain type. StatusReason is never populated: this backend's domain controllers always report Status "Active" and never enter a failed state that would produce a real status-reason message (see PARITY.md).
type EventTopic ¶
type EventTopic struct {
CreatedDateTime time.Time
DirectoryID string
TopicName string
TopicARN string
Status string
}
EventTopic domain type.
type Handler ¶
type Handler struct {
Backend StorageBackend
// contains filtered or unexported fields
}
Handler handles DirectoryService HTTP requests.
func (*Handler) ExtractOperation ¶
ExtractOperation extracts the operation name from the X-Amz-Target header.
func (*Handler) ExtractResource ¶
ExtractResource extracts the directory ID from the request body when present.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns the list of supported operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler function.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a matcher that accepts DirectoryService requests by X-Amz-Target header.
func (*Handler) Snapshot ¶
Snapshot returns a JSON snapshot of the backend state for persistence. Delegating this (and Restore below) is what makes the Handler satisfy the unexported persistence.Persistable-shaped interface cli.go's setupPersistence type-asserts services against; without it the backend's otherwise-complete BackendSnapshot/Restore implementation is never registered with the persistence manager and directoryservice state silently fails to survive a snapshot/restore cycle.
type HybridADUpdateEntry ¶
type HybridADUpdateEntry struct {
StartTime time.Time
LastUpdatedDateTime time.Time
AssessmentID string
InitiatedBy string
Status string
StatusReason string
NewDNSIPs []string
NewInstanceIDs []string
PreviousDNSIPs []string
PreviousInstanceIDs []string
}
HybridADUpdateEntry mirrors types.HybridUpdateInfoEntry, the real per-entry shape DescribeHybridADUpdate returns (nested under UpdateActivities. HybridAdministratorAccount/SelfManagedInstances). NewDNSIPs/NewInstanceIDs and PreviousDNSIPs/PreviousInstanceIDs mirror the real NewValue/ PreviousValue (types.HybridUpdateValue{DnsIps,InstanceIds}).
type HybridSettingsDescription ¶ added in v1.2.0
type HybridSettingsDescription struct {
SelfManagedDNSIPAddrs []string
SelfManagedInstanceIDs []string
}
HybridSettingsDescription mirrors AWS's HybridSettingsDescription. Populated once a directory is hybridized via CreateHybridAD (non-nil, initially empty slices) and kept current by UpdateHybridAD's SelfManagedInstancesSettings (CustomerDnsIps/InstanceIds) -- the only real source of this data, since CreateHybridADInput itself carries none (see PARITY.md).
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend implements StorageBackend using in-memory maps, nested per region.
Sixteen resource collections that were previously nested by region (outer key = region, e.g. map[string]map[string]*storedTrust) are now each a single flat *store.Table keyed by the composite "region|id" string (see regionKey above and store_setup.go), with a companion *store.Index grouping entries by region for per-region scans. aliases, ipRoutes, dirDataAccess, caEnrollment, dirSettings and updateInfoEntries remain raw region-nested maps: their values carry no identity of their own to key a store.Table by (see store_setup.go's doc comment for the full rationale).
func NewInMemoryBackend ¶
func NewInMemoryBackend(accountID, region string) *InMemoryBackend
NewInMemoryBackend constructs a new InMemoryBackend.
func (*InMemoryBackend) AcceptSharedDirectory ¶
func (b *InMemoryBackend) AcceptSharedDirectory(ctx context.Context, sharedDirectoryID string) (string, error)
AcceptSharedDirectory accepts a shared directory.
func (*InMemoryBackend) AccountID ¶
func (b *InMemoryBackend) AccountID() string
AccountID returns the account ID.
func (*InMemoryBackend) AddIpRoutes ¶
func (b *InMemoryBackend) AddIpRoutes( ctx context.Context, directoryID string, routes []IpRoute, ) error
AddIpRoutes adds CIDR IP routes to a directory.
func (*InMemoryBackend) AddRegion ¶
func (b *InMemoryBackend) AddRegion( ctx context.Context, directoryID, regionName string, vpcSettings *DirectoryVpcSettings, ) error
AddRegion adds a region to a directory.
func (*InMemoryBackend) AddTagsToResource ¶
func (b *InMemoryBackend) AddTagsToResource( ctx context.Context, resourceID string, tags []Tag, ) error
AddTagsToResource adds or updates tags on a directory.
func (*InMemoryBackend) BackendSnapshot ¶
func (b *InMemoryBackend) BackendSnapshot() []byte
BackendSnapshot serializes the backend state to JSON, nested by region.
func (*InMemoryBackend) CancelSchemaExtension ¶
func (b *InMemoryBackend) CancelSchemaExtension(ctx context.Context, directoryID, schemaExtensionID string) error
CancelSchemaExtension cancels a schema extension.
func (*InMemoryBackend) ConnectDirectory ¶
func (b *InMemoryBackend) ConnectDirectory( ctx context.Context, name, shortName, description, _ string, size DirectorySize, networkType NetworkType, connectSettings ConnectSettingsInput, tags []Tag, ) (*Directory, error)
ConnectDirectory creates an ADConnector directory. Unlike CreateDirectory and CreateMicrosoftAD, AWS's real ConnectDirectory requires a DirectoryConnectSettings object (CustomerUserName, VpcId, SubnetIds); we enforce the same required fields here.
func (*InMemoryBackend) CreateAlias ¶
func (b *InMemoryBackend) CreateAlias(ctx context.Context, directoryID, alias string) error
CreateAlias creates an alias for a directory.
func (*InMemoryBackend) CreateComputer ¶
func (b *InMemoryBackend) CreateComputer( ctx context.Context, directoryID, computerName, _ string, ) (*ComputerInfo, error)
CreateComputer creates a computer account in a directory.
func (*InMemoryBackend) CreateConditionalForwarder ¶
func (b *InMemoryBackend) CreateConditionalForwarder( ctx context.Context, directoryID, remoteDomainName string, dnsIPAddrs, dnsIPv6Addrs []string, ) error
CreateConditionalForwarder creates a conditional forwarder.
func (*InMemoryBackend) CreateDirectory ¶
func (b *InMemoryBackend) CreateDirectory( ctx context.Context, name, shortName, description, _ string, size DirectorySize, networkType NetworkType, vpcSettings *DirectoryVpcSettings, tags []Tag, ) (*Directory, error)
CreateDirectory creates a new Simple AD directory.
func (*InMemoryBackend) CreateHybridAD ¶
func (b *InMemoryBackend) CreateHybridAD( ctx context.Context, assessmentID, secretArn string, tags []Tag, ) (*Directory, error)
CreateHybridAD creates a hybrid directory. Real CreateHybridADInput is {AssessmentId, SecretArn, Tags} -- AWS derives the new directory's Name and other descriptive fields from AssessmentId's own AssessmentConfiguration (DnsName etc.), which this backend cannot capture since StartADAssessment doesn't accept AssessmentConfiguration (a separate, already-tracked gap; see PARITY.md). Rather than fabricating a domain name, this backend derives them from the SAME assessment's snapshotted source-directory fields (SourceDirectoryName etc., captured at StartADAssessment time from the existing directory that was assessed) -- genuinely real data, not invented. SecretArn is real-shape "used once and not stored" (accepted, validated, discarded), matching AWS's own documented behavior.
func (*InMemoryBackend) CreateLogSubscription ¶
func (b *InMemoryBackend) CreateLogSubscription(ctx context.Context, directoryID, logGroupName string) error
CreateLogSubscription creates a log subscription.
func (*InMemoryBackend) CreateMicrosoftAD ¶
func (b *InMemoryBackend) CreateMicrosoftAD( ctx context.Context, name, shortName, description, _ string, edition DirectoryEdition, networkType NetworkType, vpcSettings *DirectoryVpcSettings, tags []Tag, ) (*Directory, error)
CreateMicrosoftAD creates a new Managed Microsoft AD directory.
func (*InMemoryBackend) CreateSnapshot ¶
func (b *InMemoryBackend) CreateSnapshot( ctx context.Context, directoryID, name string, ) (*Snapshot, error)
CreateSnapshot creates a manual snapshot for a directory.
func (*InMemoryBackend) CreateTrust ¶
func (b *InMemoryBackend) CreateTrust( ctx context.Context, directoryID, remoteDomainName, _, trustDirection, trustType, selectiveAuth string, ) (string, error)
CreateTrust creates a trust relationship.
func (*InMemoryBackend) DeleteADAssessment ¶
func (b *InMemoryBackend) DeleteADAssessment(ctx context.Context, directoryID, assessmentID string) error
DeleteADAssessment deletes an AD assessment.
func (*InMemoryBackend) DeleteConditionalForwarder ¶
func (b *InMemoryBackend) DeleteConditionalForwarder(ctx context.Context, directoryID, remoteDomainName string) error
DeleteConditionalForwarder deletes a conditional forwarder.
func (*InMemoryBackend) DeleteDirectory ¶
func (b *InMemoryBackend) DeleteDirectory(ctx context.Context, directoryID string) error
DeleteDirectory deletes a directory and all associated resources.
func (*InMemoryBackend) DeleteLogSubscription ¶
func (b *InMemoryBackend) DeleteLogSubscription(ctx context.Context, directoryID string) error
DeleteLogSubscription deletes a log subscription.
func (*InMemoryBackend) DeleteSnapshot ¶
func (b *InMemoryBackend) DeleteSnapshot(ctx context.Context, snapshotID string) error
DeleteSnapshot deletes a snapshot.
func (*InMemoryBackend) DeleteTrust ¶
DeleteTrust deletes a trust relationship.
func (*InMemoryBackend) DeregisterCertificate ¶
func (b *InMemoryBackend) DeregisterCertificate(ctx context.Context, directoryID, certID string) error
DeregisterCertificate deregisters a certificate.
func (*InMemoryBackend) DeregisterEventTopic ¶
func (b *InMemoryBackend) DeregisterEventTopic(ctx context.Context, directoryID, topicName string) error
DeregisterEventTopic deregisters an event topic.
func (*InMemoryBackend) DescribeADAssessment ¶
func (b *InMemoryBackend) DescribeADAssessment( ctx context.Context, directoryID, assessmentID string, ) (*ADAssessmentInfo, error)
DescribeADAssessment returns details of an AD assessment.
func (*InMemoryBackend) DescribeCAEnrollmentPolicy ¶
func (b *InMemoryBackend) DescribeCAEnrollmentPolicy( ctx context.Context, directoryID string, ) (*CAEnrollmentPolicy, error)
DescribeCAEnrollmentPolicy returns CA enrollment policy for a directory.
func (*InMemoryBackend) DescribeCertificate ¶
func (b *InMemoryBackend) DescribeCertificate(ctx context.Context, directoryID, certID string) (*CertDetail, error)
DescribeCertificate returns details of a certificate.
func (*InMemoryBackend) DescribeClientAuthenticationSettings ¶
func (b *InMemoryBackend) DescribeClientAuthenticationSettings( ctx context.Context, directoryID, authType string, limit int32, nextToken string, ) ([]ClientAuthInfo, string, error)
DescribeClientAuthenticationSettings returns client auth settings.
func (*InMemoryBackend) DescribeConditionalForwarders ¶
func (b *InMemoryBackend) DescribeConditionalForwarders( ctx context.Context, directoryID string, remoteDomainNames []string, ) ([]ConditionalForwarder, error)
DescribeConditionalForwarders returns conditional forwarders for a directory.
func (*InMemoryBackend) DescribeDirectories ¶
func (b *InMemoryBackend) DescribeDirectories( ctx context.Context, directoryIDs []string, limit int32, nextToken string, ) ([]*Directory, string, error)
DescribeDirectories returns directories, optionally filtered by IDs.
func (*InMemoryBackend) DescribeDirectoryDataAccess ¶
func (b *InMemoryBackend) DescribeDirectoryDataAccess( ctx context.Context, directoryID string, ) (*DirectoryDataAccessStatus, error)
DescribeDirectoryDataAccess returns data access status for a directory.
func (*InMemoryBackend) DescribeDomainControllers ¶
func (b *InMemoryBackend) DescribeDomainControllers( ctx context.Context, directoryID string, domainControllerIDs []string, limit int32, nextToken string, ) ([]DomainController, string, error)
DescribeDomainControllers returns domain controllers for a directory.
func (*InMemoryBackend) DescribeEventTopics ¶
func (b *InMemoryBackend) DescribeEventTopics( ctx context.Context, directoryID string, topicNames []string, ) ([]EventTopic, error)
DescribeEventTopics returns event topics for a directory.
func (*InMemoryBackend) DescribeHybridADUpdate ¶
func (b *InMemoryBackend) DescribeHybridADUpdate( ctx context.Context, directoryID, updateType string, ) ([]HybridADUpdateEntry, []HybridADUpdateEntry, error)
DescribeHybridADUpdate returns update-activity history for a hybrid directory, split by real UpdateType into the two groups real types.HybridUpdateActivities carries (hybridAdministratorAccount/ selfManagedInstances return values, in that order). updateType, if non-empty, filters to a single group (matching the real optional DescribeHybridADUpdateInput.UpdateType request member).
func (*InMemoryBackend) DescribeLDAPSSettings ¶
func (b *InMemoryBackend) DescribeLDAPSSettings( ctx context.Context, directoryID, ldapsType string, limit int32, nextToken string, ) ([]LDAPSSetting, string, error)
DescribeLDAPSSettings returns LDAPS settings for a directory.
func (*InMemoryBackend) DescribeRegions ¶
func (b *InMemoryBackend) DescribeRegions( ctx context.Context, directoryID, regionName, nextToken string, ) ([]RegionDescription, string, error)
DescribeRegions returns regions for a directory.
func (*InMemoryBackend) DescribeSettings ¶
func (b *InMemoryBackend) DescribeSettings( ctx context.Context, directoryID, status, nextToken string, ) ([]SettingEntry, string, error)
DescribeSettings returns directory settings.
func (*InMemoryBackend) DescribeSharedDirectories ¶
func (b *InMemoryBackend) DescribeSharedDirectories( ctx context.Context, ownerDirID string, sharedDirIDs []string, limit int32, nextToken string, ) ([]SharedDirInfo, string, error)
DescribeSharedDirectories returns shared directories for an owner directory.
func (*InMemoryBackend) DescribeSnapshots ¶
func (b *InMemoryBackend) DescribeSnapshots( ctx context.Context, directoryID string, snapshotIDs []string, limit int32, nextToken string, ) ([]*Snapshot, string, error)
DescribeSnapshots returns snapshots filtered by directory and/or snapshot IDs.
func (*InMemoryBackend) DescribeTrusts ¶
func (b *InMemoryBackend) DescribeTrusts( ctx context.Context, directoryID string, trustIDs []string, limit int32, nextToken string, ) ([]TrustInfo, string, error)
DescribeTrusts returns trusts for a directory.
func (*InMemoryBackend) DescribeUpdateDirectory ¶
func (b *InMemoryBackend) DescribeUpdateDirectory( ctx context.Context, directoryID, updateType, nextToken string, ) ([]UpdateInfoEntry, string, error)
DescribeUpdateDirectory returns update info entries for a directory.
func (*InMemoryBackend) DisableCAEnrollmentPolicy ¶
func (b *InMemoryBackend) DisableCAEnrollmentPolicy(ctx context.Context, directoryID string) error
DisableCAEnrollmentPolicy disables CA enrollment policy.
func (*InMemoryBackend) DisableClientAuthentication ¶
func (b *InMemoryBackend) DisableClientAuthentication(ctx context.Context, directoryID, authType string) error
DisableClientAuthentication disables client authentication.
func (*InMemoryBackend) DisableDirectoryDataAccess ¶
func (b *InMemoryBackend) DisableDirectoryDataAccess(ctx context.Context, directoryID string) error
DisableDirectoryDataAccess disables directory data access.
func (*InMemoryBackend) DisableLDAPS ¶
func (b *InMemoryBackend) DisableLDAPS(ctx context.Context, directoryID, ldapsType string) error
DisableLDAPS disables LDAPS for a directory.
func (*InMemoryBackend) DisableRadius ¶
func (b *InMemoryBackend) DisableRadius(ctx context.Context, directoryID string) error
DisableRadius disables RADIUS for a directory.
func (*InMemoryBackend) DisableSso ¶
func (b *InMemoryBackend) DisableSso(ctx context.Context, directoryID string) error
DisableSso disables single sign-on for a directory.
func (*InMemoryBackend) EnableCAEnrollmentPolicy ¶
func (b *InMemoryBackend) EnableCAEnrollmentPolicy(ctx context.Context, directoryID string) error
EnableCAEnrollmentPolicy enables CA enrollment policy.
func (*InMemoryBackend) EnableClientAuthentication ¶
func (b *InMemoryBackend) EnableClientAuthentication(ctx context.Context, directoryID, authType string) error
EnableClientAuthentication enables client authentication.
func (*InMemoryBackend) EnableDirectoryDataAccess ¶
func (b *InMemoryBackend) EnableDirectoryDataAccess(ctx context.Context, directoryID string) error
EnableDirectoryDataAccess enables directory data access.
func (*InMemoryBackend) EnableLDAPS ¶
func (b *InMemoryBackend) EnableLDAPS(ctx context.Context, directoryID, ldapsType string) error
EnableLDAPS enables LDAPS for a directory.
func (*InMemoryBackend) EnableRadius ¶
func (b *InMemoryBackend) EnableRadius(ctx context.Context, directoryID string, settings RadiusSettingsInput) error
EnableRadius enables RADIUS for a directory.
func (*InMemoryBackend) EnableSso ¶
func (b *InMemoryBackend) EnableSso(ctx context.Context, directoryID string) error
EnableSso enables single sign-on for a directory.
func (*InMemoryBackend) GetDirectoryLimits ¶
func (b *InMemoryBackend) GetDirectoryLimits(ctx context.Context) *DirectoryLimits
GetDirectoryLimits returns directory limits for the region.
func (*InMemoryBackend) GetSnapshotLimits ¶
func (b *InMemoryBackend) GetSnapshotLimits( ctx context.Context, directoryID string, ) (*SnapshotLimits, error)
GetSnapshotLimits returns snapshot limits for a directory.
func (*InMemoryBackend) ListADAssessments ¶
func (b *InMemoryBackend) ListADAssessments( ctx context.Context, directoryID string, limit int32, nextToken string, ) ([]ADAssessmentInfo, string, error)
ListADAssessments returns AD assessments for a directory.
func (*InMemoryBackend) ListCertificates ¶
func (b *InMemoryBackend) ListCertificates( ctx context.Context, directoryID string, limit int32, nextToken string, ) ([]CertInfo, string, error)
ListCertificates returns certificates for a directory.
func (*InMemoryBackend) ListIpRoutes ¶
func (b *InMemoryBackend) ListIpRoutes( ctx context.Context, directoryID string, limit int32, nextToken string, ) ([]IpRoute, string, error)
ListIpRoutes returns IP routes for a directory.
func (*InMemoryBackend) ListLogSubscriptions ¶
func (b *InMemoryBackend) ListLogSubscriptions( ctx context.Context, directoryID string, limit int32, nextToken string, ) ([]LogSubscription, string, error)
ListLogSubscriptions returns log subscriptions.
func (*InMemoryBackend) ListSchemaExtensions ¶
func (b *InMemoryBackend) ListSchemaExtensions( ctx context.Context, directoryID string, limit int32, nextToken string, ) ([]SchemaExtension, string, error)
ListSchemaExtensions returns schema extensions for a directory.
func (*InMemoryBackend) ListTagsForResource ¶
func (b *InMemoryBackend) ListTagsForResource( ctx context.Context, resourceID string, limit int32, nextToken string, ) ([]Tag, string, error)
ListTagsForResource returns tags for a directory with pagination.
func (*InMemoryBackend) Region ¶
func (b *InMemoryBackend) Region() string
Region returns the region.
func (*InMemoryBackend) RegisterCertificate ¶
func (b *InMemoryBackend) RegisterCertificate( ctx context.Context, directoryID, certData, certType string, ) (string, error)
RegisterCertificate registers a certificate. certData must be a PEM-encoded X.509 certificate, matching AWS's real CertificateData contract; CommonName and ExpiryDateTime are derived from the parsed certificate (not fabricated), mirroring how AWS Directory Service actually validates and reads the cert.
func (*InMemoryBackend) RegisterEventTopic ¶
func (b *InMemoryBackend) RegisterEventTopic(ctx context.Context, directoryID, topicName string) error
RegisterEventTopic registers an event topic.
func (*InMemoryBackend) RejectSharedDirectory ¶
func (b *InMemoryBackend) RejectSharedDirectory(ctx context.Context, sharedDirectoryID string) (string, error)
RejectSharedDirectory rejects a shared directory.
func (*InMemoryBackend) RemoveIpRoutes ¶
func (b *InMemoryBackend) RemoveIpRoutes( ctx context.Context, directoryID string, cidrIPs []string, ) error
RemoveIpRoutes removes CIDR IP routes from a directory.
func (*InMemoryBackend) RemoveRegion ¶
func (b *InMemoryBackend) RemoveRegion(ctx context.Context, directoryID string) error
RemoveRegion removes a region from a directory.
func (*InMemoryBackend) RemoveTagsFromResource ¶
func (b *InMemoryBackend) RemoveTagsFromResource( ctx context.Context, resourceID string, tagKeys []string, ) error
RemoveTagsFromResource removes tags from a directory.
func (*InMemoryBackend) ResetUserPassword ¶
func (b *InMemoryBackend) ResetUserPassword(ctx context.Context, directoryID, _, _ string) error
ResetUserPassword resets a user password.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore deserializes backend state from a snapshot.
func (*InMemoryBackend) RestoreFromSnapshot ¶
func (b *InMemoryBackend) RestoreFromSnapshot(ctx context.Context, snapshotID string) error
RestoreFromSnapshot simulates restoring a directory from a snapshot.
func (*InMemoryBackend) ShareDirectory ¶
func (b *InMemoryBackend) ShareDirectory( ctx context.Context, directoryID, shareMethod, shareNotes, targetID string, ) (string, error)
ShareDirectory shares a directory.
func (*InMemoryBackend) StartADAssessment ¶
func (b *InMemoryBackend) StartADAssessment( ctx context.Context, directoryID string, cfg *ADAssessmentConfiguration, ) (string, error)
StartADAssessment starts an AD assessment. cfg is the real, optional StartADAssessmentInput.AssessmentConfiguration member.
func (*InMemoryBackend) StartSchemaExtension ¶
func (b *InMemoryBackend) StartSchemaExtension( ctx context.Context, directoryID, description, _ string, ) (string, error)
StartSchemaExtension starts a schema extension.
func (*InMemoryBackend) UnshareDirectory ¶
func (b *InMemoryBackend) UnshareDirectory(ctx context.Context, directoryID, targetID string) (string, error)
UnshareDirectory unshares a directory.
func (*InMemoryBackend) UpdateConditionalForwarder ¶
func (b *InMemoryBackend) UpdateConditionalForwarder( ctx context.Context, directoryID, remoteDomainName string, dnsIPAddrs, dnsIPv6Addrs []string, ) error
UpdateConditionalForwarder updates a conditional forwarder.
func (*InMemoryBackend) UpdateDirectorySetup ¶
func (b *InMemoryBackend) UpdateDirectorySetup(ctx context.Context, directoryID, updateType string, _ bool) error
UpdateDirectorySetup initiates a directory setup update.
func (*InMemoryBackend) UpdateHybridAD ¶
func (b *InMemoryBackend) UpdateHybridAD( ctx context.Context, directoryID, adminAccountSecretArn string, selfManagedDNSIPs, selfManagedInstanceIDs []string, ) (string, error)
UpdateHybridAD updates a hybrid directory's administrator-account secret and/or self-managed instance settings. Real UpdateHybridADInput requires at least one of HybridAdministratorAccountUpdate (adminAccountSecretArn, used once and not stored, same as CreateHybridAD's SecretArn) or SelfManagedInstancesSettings (selfManagedDNSIPs/selfManagedInstanceIDs, required to have a 1:1 correspondence per the real docs). Real UpdateHybridADOutput is {AssessmentId, DirectoryId} -- AWS triggers a fresh assessment to validate the update. This backend triggers a REAL assessment via startADAssessmentLocked (the same op StartADAssessment uses), since UpdateHybridAD always targets an existing directory -- the one mode this backend's assessment engine genuinely supports.
func (*InMemoryBackend) UpdateNumberOfDomainControllers ¶
func (b *InMemoryBackend) UpdateNumberOfDomainControllers( ctx context.Context, directoryID string, desiredNumber int32, ) error
UpdateNumberOfDomainControllers sets the desired domain controller count.
func (*InMemoryBackend) UpdateRadius ¶
func (b *InMemoryBackend) UpdateRadius(ctx context.Context, directoryID string, settings RadiusSettingsInput) error
UpdateRadius updates RADIUS settings for a directory.
func (*InMemoryBackend) UpdateSettings ¶
func (b *InMemoryBackend) UpdateSettings( ctx context.Context, directoryID string, settings []DirectorySetting, ) (string, error)
UpdateSettings updates directory settings.
func (*InMemoryBackend) UpdateTrust ¶
func (b *InMemoryBackend) UpdateTrust(ctx context.Context, trustID, selectiveAuth string) (string, error)
UpdateTrust updates a trust relationship.
func (*InMemoryBackend) VerifyTrust ¶
VerifyTrust verifies a trust relationship.
type IpRoute ¶
type IpRoute struct {
DirectoryID string
CidrIP string
Description string
AddedTime time.Time
Status string
}
IpRoute domain type.
type LDAPSSetting ¶
type LDAPSSetting struct {
LastUpdatedDateTime time.Time
CertificateExpiryDateTime time.Time
DirectoryID string
LDAPSType string
CertificateID string
State string
}
LDAPSSetting domain type.
type LDAPSType ¶ added in v1.2.0
type LDAPSType string
LDAPSType matches the AWS LDAPSType enum.
const (
LDAPSTypeClient LDAPSType = "Client"
)
type LogSubscription ¶
LogSubscription domain type.
type NetworkType ¶ added in v1.2.0
type NetworkType string
NetworkType matches the AWS NetworkType enum.
const ( NetworkTypeDualStack NetworkType = "Dual-stack" NetworkTypeIPv4Only NetworkType = "IPv4" NetworkTypeIPv6Only NetworkType = "IPv6" )
type OSVersion ¶ added in v1.2.0
type OSVersion string
OSVersion matches the AWS OSVersion enum. This backend does not track a directory's underlying OS version (AWS assigns it internally and does not document a deterministic default), so Directory.OsVersion is always left as the zero value; see PARITY.md.
type OwnerDirectoryDescription ¶ added in v1.2.0
type OwnerDirectoryDescription struct {
RadiusSettings *RadiusSettingsDescription
VpcSettings *DirectoryVpcSettings
AccountID string
DirectoryID string
NetworkType NetworkType
RadiusStatus RadiusStatus
DNSIPAddrs []string
DNSIPv6Addrs []string
}
OwnerDirectoryDescription mirrors AWS's OwnerDirectoryDescription, present on the directory-consumer's copy of a shared directory. This backend never populates it: shared directories are tracked only via SharedDirInfo (DescribeSharedDirectories) and are not materialized as a separate Directory entry in the consumer's DescribeDirectories view (see PARITY.md).
type Provider ¶
type Provider struct{}
Provider implements service.Provider for Amazon Directory Service.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init initializes the DirectoryService backend and handler.
type RadiusInfo ¶
type RadiusInfo struct {
DirectoryID string
AuthenticationProtocol string
RadiusServers []string
RadiusPort int32
RadiusRetries int32
RadiusTimeout int32
UseSameUsername bool
}
RadiusInfo is returned by describe (currently inferred from directory).
type RadiusSettingsDescription ¶ added in v1.2.0
type RadiusSettingsDescription struct {
AuthenticationProtocol string
DisplayLabel string
RadiusServers []string
RadiusServersIPv6 []string
RadiusPort int32
RadiusRetries int32
RadiusTimeout int32
UseSameUsername bool
}
RadiusSettingsDescription mirrors AWS's RadiusSettings type as returned on DirectoryDescription.RadiusSettings. RadiusServersIPv6 is not populated: this backend's RADIUS settings storage does not track IPv6 server addresses (see PARITY.md).
type RadiusSettingsInput ¶
type RadiusSettingsInput struct {
AuthenticationProtocol string
DisplayLabel string
RadiusServers []string
RadiusPort int32
RadiusRetries int32
RadiusTimeout int32
UseSameUsername bool
}
RadiusSettingsInput is used for Enable/Update RADIUS.
type RadiusStatus ¶ added in v1.2.0
type RadiusStatus string
RadiusStatus matches the AWS RadiusStatus enum.
const ( RadiusStatusCreating RadiusStatus = "Creating" RadiusStatusCompleted RadiusStatus = "Completed" RadiusStatusFailed RadiusStatus = "Failed" )
type RegionDescription ¶
type RegionDescription struct {
LaunchTime time.Time
StatusLastUpdatedDateTime time.Time
VpcSettings *DirectoryVpcSettings
DirectoryID string
RegionName string
RegionType string
Status string
DesiredNumberOfDomainCtrls int32
}
RegionDescription domain type.
type RegionsInfo ¶ added in v1.2.0
RegionsInfo mirrors AWS's RegionsInfo, describing multi-Region replication for a Managed Microsoft AD directory.
type SchemaExtension ¶
type SchemaExtension struct {
StartTime time.Time
EndTime time.Time
ExtensionID string
DirectoryID string
Description string
Status string
}
SchemaExtension domain type.
type SelectiveAuth ¶ added in v1.2.0
type SelectiveAuth string
SelectiveAuth matches the AWS SelectiveAuth enum.
const ( SelectiveAuthEnabled SelectiveAuth = "Enabled" SelectiveAuthDisabled SelectiveAuth = "Disabled" )
type SettingEntry ¶
type SettingEntry struct {
LastUpdatedDateTime time.Time
DirectoryID string
Name string
AllowedValues string
AppliedValue string
RequestedValue string
Status string
}
SettingEntry domain type.
type ShareMethod ¶ added in v1.2.0
type ShareMethod string
ShareMethod matches the AWS ShareMethod enum.
const ( )
type ShareStatus ¶ added in v1.2.0
type ShareStatus string
ShareStatus matches the AWS ShareStatus enum.
const ( )
type Snapshot ¶
type Snapshot struct {
StartTime time.Time
SnapshotID string
DirectoryID string
Name string
Status SnapshotStatus
Type SnapshotType
}
Snapshot represents an AWS Directory Service snapshot. StartTime is first: time.Time's non-pointer prefix reduces GC pointer bytes.
type SnapshotLimits ¶
type SnapshotLimits struct {
ManualSnapshotsCurrentCount int32
ManualSnapshotsLimit int32
ManualSnapshotsLimitReached bool
}
SnapshotLimits contains snapshot limit information.
type SnapshotStatus ¶
type SnapshotStatus string
SnapshotStatus matches the AWS SnapshotStatus enum.
const (
SnapshotStatusCompleted SnapshotStatus = "Completed"
)
type SnapshotType ¶
type SnapshotType string
SnapshotType matches the AWS SnapshotType enum.
const (
SnapshotTypeManual SnapshotType = "Manual"
)
type StorageBackend ¶
type StorageBackend interface {
CreateDirectory(
ctx context.Context,
name, shortName, description, password string,
size DirectorySize,
networkType NetworkType,
vpcSettings *DirectoryVpcSettings,
tags []Tag,
) (*Directory, error)
CreateMicrosoftAD(
ctx context.Context,
name, shortName, description, password string,
edition DirectoryEdition,
networkType NetworkType,
vpcSettings *DirectoryVpcSettings,
tags []Tag,
) (*Directory, error)
DeleteDirectory(ctx context.Context, directoryID string) error
DescribeDirectories(
ctx context.Context,
directoryIDs []string,
limit int32,
nextToken string,
) ([]*Directory, string, error)
CreateAlias(ctx context.Context, directoryID, alias string) error
EnableSso(ctx context.Context, directoryID string) error
DisableSso(ctx context.Context, directoryID string) error
GetDirectoryLimits(ctx context.Context) *DirectoryLimits
CreateSnapshot(ctx context.Context, directoryID, name string) (*Snapshot, error)
DeleteSnapshot(ctx context.Context, snapshotID string) error
DescribeSnapshots(
ctx context.Context,
directoryID string,
snapshotIDs []string,
limit int32,
nextToken string,
) ([]*Snapshot, string, error)
GetSnapshotLimits(ctx context.Context, directoryID string) (*SnapshotLimits, error)
RestoreFromSnapshot(ctx context.Context, snapshotID string) error
AddTagsToResource(ctx context.Context, resourceID string, tags []Tag) error
RemoveTagsFromResource(ctx context.Context, resourceID string, tagKeys []string) error
ListTagsForResource(ctx context.Context, resourceID string, limit int32, nextToken string) ([]Tag, string, error)
AddIpRoutes(ctx context.Context, directoryID string, routes []IpRoute) error
RemoveIpRoutes(ctx context.Context, directoryID string, cidrIPs []string) error
ListIpRoutes(ctx context.Context, directoryID string, limit int32, nextToken string) ([]IpRoute, string, error)
AddRegion(ctx context.Context, directoryID, regionName string, vpcSettings *DirectoryVpcSettings) error
RemoveRegion(ctx context.Context, directoryID string) error
DescribeRegions(ctx context.Context, directoryID, regionName, nextToken string) ([]RegionDescription, string, error)
StartSchemaExtension(ctx context.Context, directoryID, description, schemaExtensionBody string) (string, error)
CancelSchemaExtension(ctx context.Context, directoryID, schemaExtensionID string) error
ListSchemaExtensions(
ctx context.Context,
directoryID string,
limit int32,
nextToken string,
) ([]SchemaExtension, string, error)
CreateConditionalForwarder(
ctx context.Context, directoryID, remoteDomainName string, dnsIPAddrs, dnsIPv6Addrs []string,
) error
UpdateConditionalForwarder(
ctx context.Context, directoryID, remoteDomainName string, dnsIPAddrs, dnsIPv6Addrs []string,
) error
DeleteConditionalForwarder(ctx context.Context, directoryID, remoteDomainName string) error
DescribeConditionalForwarders(
ctx context.Context,
directoryID string,
remoteDomainNames []string,
) ([]ConditionalForwarder, error)
CreateLogSubscription(ctx context.Context, directoryID, logGroupName string) error
DeleteLogSubscription(ctx context.Context, directoryID string) error
ListLogSubscriptions(
ctx context.Context,
directoryID string,
limit int32,
nextToken string,
) ([]LogSubscription, string, error)
RegisterEventTopic(ctx context.Context, directoryID, topicName string) error
DeregisterEventTopic(ctx context.Context, directoryID, topicName string) error
DescribeEventTopics(ctx context.Context, directoryID string, topicNames []string) ([]EventTopic, error)
DescribeDomainControllers(
ctx context.Context,
directoryID string,
domainControllerIDs []string,
limit int32,
nextToken string,
) ([]DomainController, string, error)
UpdateNumberOfDomainControllers(ctx context.Context, directoryID string, desiredNumber int32) error
CreateTrust(
ctx context.Context,
directoryID, remoteDomainName, trustPassword, trustDirection, trustType, selectiveAuth string,
) (string, error)
DeleteTrust(ctx context.Context, trustID string) (string, error)
DescribeTrusts(
ctx context.Context,
directoryID string,
trustIDs []string,
limit int32,
nextToken string,
) ([]TrustInfo, string, error)
UpdateTrust(ctx context.Context, trustID, selectiveAuth string) (string, error)
VerifyTrust(ctx context.Context, trustID string) (string, error)
ctx context.Context,
ownerDirID string,
sharedDirIDs []string,
limit int32,
nextToken string,
) ([]SharedDirInfo, string, error)
RegisterCertificate(ctx context.Context, directoryID, certData, certType string) (string, error)
DeregisterCertificate(ctx context.Context, directoryID, certID string) error
ListCertificates(ctx context.Context, directoryID string, limit int32, nextToken string) ([]CertInfo, string, error)
DescribeCertificate(ctx context.Context, directoryID, certID string) (*CertDetail, error)
EnableLDAPS(ctx context.Context, directoryID, ldapsType string) error
DisableLDAPS(ctx context.Context, directoryID, ldapsType string) error
DescribeLDAPSSettings(
ctx context.Context,
directoryID, ldapsType string,
limit int32,
nextToken string,
) ([]LDAPSSetting, string, error)
EnableClientAuthentication(ctx context.Context, directoryID, authType string) error
DisableClientAuthentication(ctx context.Context, directoryID, authType string) error
DescribeClientAuthenticationSettings(
ctx context.Context,
directoryID, authType string,
limit int32,
nextToken string,
) ([]ClientAuthInfo, string, error)
EnableRadius(ctx context.Context, directoryID string, settings RadiusSettingsInput) error
DisableRadius(ctx context.Context, directoryID string) error
UpdateRadius(ctx context.Context, directoryID string, settings RadiusSettingsInput) error
EnableDirectoryDataAccess(ctx context.Context, directoryID string) error
DisableDirectoryDataAccess(ctx context.Context, directoryID string) error
DescribeDirectoryDataAccess(ctx context.Context, directoryID string) (*DirectoryDataAccessStatus, error)
EnableCAEnrollmentPolicy(ctx context.Context, directoryID string) error
DisableCAEnrollmentPolicy(ctx context.Context, directoryID string) error
DescribeCAEnrollmentPolicy(ctx context.Context, directoryID string) (*CAEnrollmentPolicy, error)
StartADAssessment(ctx context.Context, directoryID string, cfg *ADAssessmentConfiguration) (string, error)
DeleteADAssessment(ctx context.Context, directoryID, assessmentID string) error
DescribeADAssessment(ctx context.Context, directoryID, assessmentID string) (*ADAssessmentInfo, error)
ListADAssessments(
ctx context.Context,
directoryID string,
limit int32,
nextToken string,
) ([]ADAssessmentInfo, string, error)
CreateHybridAD(
ctx context.Context,
assessmentID, secretArn string,
tags []Tag,
) (*Directory, error)
UpdateHybridAD(
ctx context.Context,
directoryID, adminAccountSecretArn string,
selfManagedDNSIPs, selfManagedInstanceIDs []string,
) (assessmentID string, err error)
DescribeHybridADUpdate(
ctx context.Context,
directoryID, updateType string,
) (hybridAdministratorAccount, selfManagedInstances []HybridADUpdateEntry, err error)
CreateComputer(ctx context.Context, directoryID, computerName, password string) (*ComputerInfo, error)
UpdateSettings(ctx context.Context, directoryID string, settings []DirectorySetting) (string, error)
DescribeSettings(ctx context.Context, directoryID, status, nextToken string) ([]SettingEntry, string, error)
UpdateDirectorySetup(ctx context.Context, directoryID, updateType string, createSnapshotBeforeUpdate bool) error
DescribeUpdateDirectory(
ctx context.Context,
directoryID, updateType, nextToken string,
) ([]UpdateInfoEntry, string, error)
ResetUserPassword(ctx context.Context, directoryID, userName, newPassword string) error
ConnectDirectory(
ctx context.Context,
name, shortName, description, password string,
size DirectorySize,
networkType NetworkType,
connectSettings ConnectSettingsInput,
tags []Tag,
) (*Directory, error)
AccountID() string
Region() string
Reset()
BackendSnapshot() []byte
Restore(ctx context.Context, data []byte) error
}
StorageBackend is the interface for DirectoryService storage operations.
type TrustDirection ¶ added in v1.2.0
type TrustDirection string
TrustDirection matches the AWS TrustDirection enum.
const ( TrustDirectionOneWayOutgoing TrustDirection = "One-Way: Outgoing" TrustDirectionOneWayIncoming TrustDirection = "One-Way: Incoming" TrustDirectionTwoWay TrustDirection = "Two-Way" )
type TrustInfo ¶
type TrustInfo struct {
CreatedDateTime time.Time
LastUpdatedDateTime time.Time
StateLastUpdatedTime time.Time
TrustID string
DirectoryID string
RemoteDomainName string
TrustDirection string
TrustType string
TrustState string
SelectiveAuth string
TrustStateReason string
}
TrustInfo domain type.
type UpdateInfoEntry ¶
type UpdateInfoEntry struct {
StartTime time.Time
LastUpdatedDateTime time.Time
DirectoryID string
UpdateType string
Status string
NewValue string
PreviousValue string
InitiatedBy string
Region string
}
UpdateInfoEntry domain type.
type UpdateType ¶ added in v1.2.0
type UpdateType string
UpdateType matches the AWS UpdateType enum.
const ( UpdateTypeOS UpdateType = "OS" UpdateTypeNetwork UpdateType = "NETWORK" UpdateTypeSize UpdateType = "SIZE" )
Source Files
¶
- ad_assessments.go
- certificates.go
- client_auth.go
- conditional_forwarders.go
- directories.go
- domain_controllers.go
- errors.go
- event_topics.go
- handler.go
- handler_ad_assessments.go
- handler_certificates.go
- handler_client_auth.go
- handler_conditional_forwarders.go
- handler_directories.go
- handler_domain_controllers.go
- handler_event_topics.go
- handler_hybrid_ad.go
- handler_ip_routes.go
- handler_ldaps.go
- handler_log_subscriptions.go
- handler_radius.go
- handler_regions.go
- handler_schema_extensions.go
- handler_settings.go
- handler_shared_directories.go
- handler_snapshots.go
- handler_sso.go
- handler_tags.go
- handler_trusts.go
- hybrid_ad.go
- interfaces.go
- ip_routes.go
- ldaps.go
- log_subscriptions.go
- models.go
- persistence.go
- provider.go
- radius.go
- regions.go
- schema_extensions.go
- settings.go
- shared_directories.go
- snapshots.go
- sso.go
- store.go
- store_setup.go
- tags.go
- trusts.go