Documentation ¶
Overview ¶
Package directoryservice provides a client for AWS Directory Service.
Index ¶
- type Attribute
- type Computer
- type ConnectDirectoryInput
- type ConnectDirectoryOutput
- type CreateAliasInput
- type CreateAliasOutput
- type CreateComputerInput
- type CreateComputerOutput
- type CreateDirectoryInput
- type CreateDirectoryOutput
- type CreateSnapshotInput
- type CreateSnapshotOutput
- type DeleteDirectoryInput
- type DeleteDirectoryOutput
- type DeleteSnapshotInput
- type DeleteSnapshotOutput
- type DescribeDirectoriesInput
- type DescribeDirectoriesOutput
- type DescribeSnapshotsInput
- type DescribeSnapshotsOutput
- type DirectoryConnectSettings
- type DirectoryConnectSettingsDescription
- type DirectoryDescription
- type DirectoryLimits
- type DirectoryService
- func (c *DirectoryService) ConnectDirectory(input *ConnectDirectoryInput) (*ConnectDirectoryOutput, error)
- func (c *DirectoryService) ConnectDirectoryRequest(input *ConnectDirectoryInput) (req *aws.Request, output *ConnectDirectoryOutput)
- func (c *DirectoryService) CreateAlias(input *CreateAliasInput) (*CreateAliasOutput, error)
- func (c *DirectoryService) CreateAliasRequest(input *CreateAliasInput) (req *aws.Request, output *CreateAliasOutput)
- func (c *DirectoryService) CreateComputer(input *CreateComputerInput) (*CreateComputerOutput, error)
- func (c *DirectoryService) CreateComputerRequest(input *CreateComputerInput) (req *aws.Request, output *CreateComputerOutput)
- func (c *DirectoryService) CreateDirectory(input *CreateDirectoryInput) (*CreateDirectoryOutput, error)
- func (c *DirectoryService) CreateDirectoryRequest(input *CreateDirectoryInput) (req *aws.Request, output *CreateDirectoryOutput)
- func (c *DirectoryService) CreateSnapshot(input *CreateSnapshotInput) (*CreateSnapshotOutput, error)
- func (c *DirectoryService) CreateSnapshotRequest(input *CreateSnapshotInput) (req *aws.Request, output *CreateSnapshotOutput)
- func (c *DirectoryService) DeleteDirectory(input *DeleteDirectoryInput) (*DeleteDirectoryOutput, error)
- func (c *DirectoryService) DeleteDirectoryRequest(input *DeleteDirectoryInput) (req *aws.Request, output *DeleteDirectoryOutput)
- func (c *DirectoryService) DeleteSnapshot(input *DeleteSnapshotInput) (*DeleteSnapshotOutput, error)
- func (c *DirectoryService) DeleteSnapshotRequest(input *DeleteSnapshotInput) (req *aws.Request, output *DeleteSnapshotOutput)
- func (c *DirectoryService) DescribeDirectories(input *DescribeDirectoriesInput) (*DescribeDirectoriesOutput, error)
- func (c *DirectoryService) DescribeDirectoriesRequest(input *DescribeDirectoriesInput) (req *aws.Request, output *DescribeDirectoriesOutput)
- func (c *DirectoryService) DescribeSnapshots(input *DescribeSnapshotsInput) (*DescribeSnapshotsOutput, error)
- func (c *DirectoryService) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (req *aws.Request, output *DescribeSnapshotsOutput)
- func (c *DirectoryService) DisableRadius(input *DisableRadiusInput) (*DisableRadiusOutput, error)
- func (c *DirectoryService) DisableRadiusRequest(input *DisableRadiusInput) (req *aws.Request, output *DisableRadiusOutput)
- func (c *DirectoryService) DisableSSO(input *DisableSSOInput) (*DisableSSOOutput, error)
- func (c *DirectoryService) DisableSSORequest(input *DisableSSOInput) (req *aws.Request, output *DisableSSOOutput)
- func (c *DirectoryService) EnableRadius(input *EnableRadiusInput) (*EnableRadiusOutput, error)
- func (c *DirectoryService) EnableRadiusRequest(input *EnableRadiusInput) (req *aws.Request, output *EnableRadiusOutput)
- func (c *DirectoryService) EnableSSO(input *EnableSSOInput) (*EnableSSOOutput, error)
- func (c *DirectoryService) EnableSSORequest(input *EnableSSOInput) (req *aws.Request, output *EnableSSOOutput)
- func (c *DirectoryService) GetDirectoryLimits(input *GetDirectoryLimitsInput) (*GetDirectoryLimitsOutput, error)
- func (c *DirectoryService) GetDirectoryLimitsRequest(input *GetDirectoryLimitsInput) (req *aws.Request, output *GetDirectoryLimitsOutput)
- func (c *DirectoryService) GetSnapshotLimits(input *GetSnapshotLimitsInput) (*GetSnapshotLimitsOutput, error)
- func (c *DirectoryService) GetSnapshotLimitsRequest(input *GetSnapshotLimitsInput) (req *aws.Request, output *GetSnapshotLimitsOutput)
- func (c *DirectoryService) RestoreFromSnapshot(input *RestoreFromSnapshotInput) (*RestoreFromSnapshotOutput, error)
- func (c *DirectoryService) RestoreFromSnapshotRequest(input *RestoreFromSnapshotInput) (req *aws.Request, output *RestoreFromSnapshotOutput)
- func (c *DirectoryService) UpdateRadius(input *UpdateRadiusInput) (*UpdateRadiusOutput, error)
- func (c *DirectoryService) UpdateRadiusRequest(input *UpdateRadiusInput) (req *aws.Request, output *UpdateRadiusOutput)
- type DirectoryVPCSettings
- type DirectoryVPCSettingsDescription
- type DisableRadiusInput
- type DisableRadiusOutput
- type DisableSSOInput
- type DisableSSOOutput
- type EnableRadiusInput
- type EnableRadiusOutput
- type EnableSSOInput
- type EnableSSOOutput
- type GetDirectoryLimitsInput
- type GetDirectoryLimitsOutput
- type GetSnapshotLimitsInput
- type GetSnapshotLimitsOutput
- type RadiusSettings
- type RestoreFromSnapshotInput
- type RestoreFromSnapshotOutput
- type Snapshot
- type SnapshotLimits
- type UpdateRadiusInput
- type UpdateRadiusOutput
Examples ¶
- DirectoryService.ConnectDirectory
- DirectoryService.CreateAlias
- DirectoryService.CreateComputer
- DirectoryService.CreateDirectory
- DirectoryService.CreateSnapshot
- DirectoryService.DeleteDirectory
- DirectoryService.DeleteSnapshot
- DirectoryService.DescribeDirectories
- DirectoryService.DescribeSnapshots
- DirectoryService.DisableRadius
- DirectoryService.DisableSSO
- DirectoryService.EnableRadius
- DirectoryService.EnableSSO
- DirectoryService.GetDirectoryLimits
- DirectoryService.GetSnapshotLimits
- DirectoryService.RestoreFromSnapshot
- DirectoryService.UpdateRadius
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attribute ¶
type Attribute struct { // The name of the attribute. Name *string `type:"string"` // The value of the attribute. Value *string `type:"string"` // contains filtered or unexported fields }
Represents a named directory attribute.
type Computer ¶
type Computer struct { // An array of Attribute objects that contain the LDAP attributes that belong // to the computer account. ComputerAttributes []*Attribute `type:"list"` // The identifier of the computer. ComputerID *string `locationName:"ComputerId" type:"string"` // The computer name. ComputerName *string `type:"string"` // contains filtered or unexported fields }
Contains information about a computer account in a directory.
type ConnectDirectoryInput ¶
type ConnectDirectoryInput struct { // A DirectoryConnectSettings object that contains additional information for // the operation. ConnectSettings *DirectoryConnectSettings `type:"structure" required:"true"` // A textual description for the directory. Description *string `type:"string"` // The fully-qualified name of the on-premises directory, such as corp.example.com. Name *string `type:"string" required:"true"` // The password for the on-premises user account. Password *string `type:"string" required:"true"` // The NetBIOS name of the on-premises directory, such as CORP. ShortName *string `type:"string"` // The size of the directory. Size *string `type:"string" required:"true"` // contains filtered or unexported fields }
Contains the inputs for the ConnectDirectory operation.
type ConnectDirectoryOutput ¶
type ConnectDirectoryOutput struct { // The identifier of the new directory. DirectoryID *string `locationName:"DirectoryId" type:"string"` // contains filtered or unexported fields }
Contains the results of the ConnectDirectory operation.
type CreateAliasInput ¶
type CreateAliasInput struct { // The requested alias. // // The alias must be unique amongst all aliases in AWS. This operation will // throw an EntityAlreadyExistsException if this alias already exists. Alias *string `type:"string" required:"true"` // The identifier of the directory to create the alias for. DirectoryID *string `locationName:"DirectoryId" type:"string" required:"true"` // contains filtered or unexported fields }
Contains the inputs for the CreateAlias operation.
type CreateAliasOutput ¶
type CreateAliasOutput struct { // The alias for the directory. Alias *string `type:"string"` // The identifier of the directory. DirectoryID *string `locationName:"DirectoryId" type:"string"` // contains filtered or unexported fields }
Contains the results of the CreateAlias operation.
type CreateComputerInput ¶
type CreateComputerInput struct { // An array of Attribute objects that contain any LDAP attributes to apply to // the computer account. ComputerAttributes []*Attribute `type:"list"` // The name of the computer account. ComputerName *string `type:"string" required:"true"` // The identifier of the directory to create the computer account in. DirectoryID *string `locationName:"DirectoryId" type:"string" required:"true"` // The fully-qualified distinguished name of the organizational unit to place // the computer account in. OrganizationalUnitDistinguishedName *string `type:"string"` // A one-time password that is used to join the computer to the directory. You // should generate a random, strong password to use for this parameter. Password *string `type:"string" required:"true"` // contains filtered or unexported fields }
Contains the inputs for the CreateComputer operation.
type CreateComputerOutput ¶
type CreateComputerOutput struct { // A Computer object the represents the computer account. Computer *Computer `type:"structure"` // contains filtered or unexported fields }
Contains the results for the CreateComputer operation.
type CreateDirectoryInput ¶
type CreateDirectoryInput struct { // A textual description for the directory. Description *string `type:"string"` // The fully qualified name for the directory, such as corp.example.com. Name *string `type:"string" required:"true"` // The password for the directory administrator. The directory creation process // creates a directory administrator account with the username Administrator // and this password. Password *string `type:"string" required:"true"` // The short name of the directory, such as CORP. ShortName *string `type:"string"` // The size of the directory. Size *string `type:"string" required:"true"` // A DirectoryVpcSettings object that contains additional information for the // operation. VPCSettings *DirectoryVPCSettings `locationName:"VpcSettings" type:"structure"` // contains filtered or unexported fields }
Contains the inputs for the CreateDirectory operation.
type CreateDirectoryOutput ¶
type CreateDirectoryOutput struct { // The identifier of the directory that was created. DirectoryID *string `locationName:"DirectoryId" type:"string"` // contains filtered or unexported fields }
Contains the results of the CreateDirectory operation.
type CreateSnapshotInput ¶
type CreateSnapshotInput struct { // The identifier of the directory to take a snapshot of. DirectoryID *string `locationName:"DirectoryId" type:"string" required:"true"` // The descriptive name to apply to the snapshot. Name *string `type:"string"` // contains filtered or unexported fields }
Contains the inputs for the CreateSnapshot operation.
type CreateSnapshotOutput ¶
type CreateSnapshotOutput struct { // The identifier of the snapshot that was created. SnapshotID *string `locationName:"SnapshotId" type:"string"` // contains filtered or unexported fields }
Contains the results of the CreateSnapshot operation.
type DeleteDirectoryInput ¶
type DeleteDirectoryInput struct { // The identifier of the directory to delete. DirectoryID *string `locationName:"DirectoryId" type:"string" required:"true"` // contains filtered or unexported fields }
Contains the inputs for the DeleteDirectory operation.
type DeleteDirectoryOutput ¶
type DeleteDirectoryOutput struct { // The directory identifier. DirectoryID *string `locationName:"DirectoryId" type:"string"` // contains filtered or unexported fields }
Contains the results of the DeleteDirectory operation.
type DeleteSnapshotInput ¶
type DeleteSnapshotInput struct { // The identifier of the directory snapshot to be deleted. SnapshotID *string `locationName:"SnapshotId" type:"string" required:"true"` // contains filtered or unexported fields }
Contains the inputs for the DeleteSnapshot operation.
type DeleteSnapshotOutput ¶
type DeleteSnapshotOutput struct { // The identifier of the directory snapshot that was deleted. SnapshotID *string `locationName:"SnapshotId" type:"string"` // contains filtered or unexported fields }
Contains the results of the DeleteSnapshot operation.
type DescribeDirectoriesInput ¶
type DescribeDirectoriesInput struct { // A list of identifiers of the directories to obtain the information for. If // this member is null, all directories that belong to the current account are // returned. // // An empty list results in an InvalidParameterException being thrown. DirectoryIDs []*string `locationName:"DirectoryIds" type:"list"` // The maximum number of items to return. If this value is zero, the maximum // number of items is specified by the limitations of the operation. Limit *int64 `type:"integer"` // The DescribeDirectoriesResult.NextToken value from a previous call to DescribeDirectories. // Pass null if this is the first call. NextToken *string `type:"string"` // contains filtered or unexported fields }
Contains the inputs for the DescribeDirectories operation.
type DescribeDirectoriesOutput ¶
type DescribeDirectoriesOutput struct { // The list of DirectoryDescription objects that were retrieved. // // It is possible that this list contains less than the number of items specified // in the Limit member of the request. This occurs if there are less than the // requested number of items left to retrieve, or if the limitations of the // operation have been exceeded. DirectoryDescriptions []*DirectoryDescription `type:"list"` // If not null, more results are available. Pass this value for the NextToken // parameter in a subsequent call to DescribeDirectories to retrieve the next // set of items. NextToken *string `type:"string"` // contains filtered or unexported fields }
Contains the results of the DescribeDirectories operation.
type DescribeSnapshotsInput ¶
type DescribeSnapshotsInput struct { // The identifier of the directory to retrieve snapshot information for. DirectoryID *string `locationName:"DirectoryId" type:"string"` // The maximum number of objects to return. Limit *int64 `type:"integer"` // The DescribeSnapshotsResult.NextToken value from a previous call to DescribeSnapshots. // Pass null if this is the first call. NextToken *string `type:"string"` // A list of identifiers of the snapshots to obtain the information for. If // this member is null or empty, all snapshots are returned using the Limit // and NextToken members. SnapshotIDs []*string `locationName:"SnapshotIds" type:"list"` // contains filtered or unexported fields }
Contains the inputs for the DescribeSnapshots operation.
type DescribeSnapshotsOutput ¶
type DescribeSnapshotsOutput struct { // If not null, more results are available. Pass this value in the NextToken // member of a subsequent call to DescribeSnapshots. NextToken *string `type:"string"` // The list of Snapshot objects that were retrieved. // // It is possible that this list contains less than the number of items specified // in the Limit member of the request. This occurs if there are less than the // requested number of items left to retrieve, or if the limitations of the // operation have been exceeded. Snapshots []*Snapshot `type:"list"` // contains filtered or unexported fields }
Contains the results of the DescribeSnapshots operation.
type DirectoryConnectSettings ¶
type DirectoryConnectSettings struct { // A list of one or more IP addresses of DNS servers or domain controllers in // the on-premises directory. CustomerDNSIPs []*string `locationName:"CustomerDnsIps" type:"list" required:"true"` // The username of an account in the on-premises directory that is used to connect // to the directory. This account must have the following privileges: // // Read users and groups Create computer objects Join computers to the domain CustomerUserName *string `type:"string" required:"true"` // A list of subnet identifiers in the VPC that the AD Connector is created // in. SubnetIDs []*string `locationName:"SubnetIds" type:"list" required:"true"` // The identifier of the VPC that the AD Connector is created in. VPCID *string `locationName:"VpcId" type:"string" required:"true"` // contains filtered or unexported fields }
Contains information for the ConnectDirectory operation when an AD Connector directory is being created.
type DirectoryConnectSettingsDescription ¶
type DirectoryConnectSettingsDescription struct { // A list of the Availability Zones that the directory is in. AvailabilityZones []*string `type:"list"` // The IP addresses of the AD Connector servers. ConnectIPs []*string `locationName:"ConnectIps" type:"list"` // The username of the service account in the on-premises directory. CustomerUserName *string `type:"string"` // The security group identifier for the AD Connector directory. SecurityGroupID *string `locationName:"SecurityGroupId" type:"string"` // A list of subnet identifiers in the VPC that the AD connector is in. SubnetIDs []*string `locationName:"SubnetIds" type:"list"` // The identifier of the VPC that the AD Connector is in. VPCID *string `locationName:"VpcId" type:"string"` // contains filtered or unexported fields }
Contains information about an AD Connector directory.
type DirectoryDescription ¶
type DirectoryDescription struct { // The access URL for the directory, such as http://<alias>.awsapps.com. AccessURL *string `locationName:"AccessUrl" type:"string"` // The alias for the directory. Alias *string `type:"string"` // A DirectoryConnectSettingsDescription object that contains additional information // about an AD Connector directory. This member is only present if the directory // is an AD Connector directory. ConnectSettings *DirectoryConnectSettingsDescription `type:"structure"` // The IP addresses of the DNS servers for the directory. For a Simple AD directory, // these are the IP addresses of the Simple AD directory servers. For an AD // Connector directory, these are the IP addresses of the DNS servers or domain // controllers in the on-premises directory that the AD Connector is connected // to. DNSIPAddrs []*string `locationName:"DnsIpAddrs" type:"list"` // The textual description for the directory. Description *string `type:"string"` // The directory identifier. DirectoryID *string `locationName:"DirectoryId" type:"string"` // Specifies when the directory was created. LaunchTime *time.Time `type:"timestamp" timestampFormat:"unix"` // The fully-qualified name of the directory. Name *string `type:"string"` // A RadiusSettings object that contains information about the RADIUS server // configured for this directory. RadiusSettings *RadiusSettings `type:"structure"` // The status of the RADIUS MFA server connection. RadiusStatus *string `type:"string"` // Indicates if single-sign on is enabled for the directory. For more information, // see EnableSso and DisableSso. SSOEnabled *bool `locationName:"SsoEnabled" type:"boolean"` // The short name of the directory. ShortName *string `type:"string"` // The directory size. Size *string `type:"string"` // The current stage of the directory. Stage *string `type:"string"` // The date and time that the stage was last updated. StageLastUpdatedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` // Additional information about the directory stage. StageReason *string `type:"string"` // The directory size. Type *string `type:"string"` // A DirectoryVpcSettingsDescription object that contains additional information // about a Simple AD directory. This member is only present if the directory // is a Simple AD directory. VPCSettings *DirectoryVPCSettingsDescription `locationName:"VpcSettings" type:"structure"` // contains filtered or unexported fields }
Contains information about an AWS Directory Service directory.
type DirectoryLimits ¶
type DirectoryLimits struct { // The current number of cloud directories in the region. CloudOnlyDirectoriesCurrentCount *int64 `type:"integer"` // The maximum number of cloud directories allowed in the region. CloudOnlyDirectoriesLimit *int64 `type:"integer"` // Indicates if the cloud directory limit has been reached. CloudOnlyDirectoriesLimitReached *bool `type:"boolean"` // The current number of connected directories in the region. ConnectedDirectoriesCurrentCount *int64 `type:"integer"` // The maximum number of connected directories allowed in the region. ConnectedDirectoriesLimit *int64 `type:"integer"` // Indicates if the connected directory limit has been reached. ConnectedDirectoriesLimitReached *bool `type:"boolean"` // contains filtered or unexported fields }
Contains directory limit information for a region.
type DirectoryService ¶
DirectoryService is a client for Directory Service.
func New ¶
func New(config *aws.Config) *DirectoryService
New returns a new DirectoryService client.
func (*DirectoryService) ConnectDirectory ¶
func (c *DirectoryService) ConnectDirectory(input *ConnectDirectoryInput) (*ConnectDirectoryOutput, error)
Creates an AD Connector to connect an on-premises directory.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/directoryservice" ) func main() { svc := directoryservice.New(nil) params := &directoryservice.ConnectDirectoryInput{ ConnectSettings: &directoryservice.DirectoryConnectSettings{ // Required CustomerDNSIPs: []*string{ // Required aws.String("IpAddr"), // Required // More values... }, CustomerUserName: aws.String("UserName"), // Required SubnetIDs: []*string{ // Required aws.String("SubnetId"), // Required // More values... }, VPCID: aws.String("VpcId"), // Required }, Name: aws.String("DirectoryName"), // Required Password: aws.String("ConnectPassword"), // Required Size: aws.String("DirectorySize"), // Required Description: aws.String("Description"), ShortName: aws.String("DirectoryShortName"), } resp, err := svc.ConnectDirectory(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok { // Generic AWS Error with Code, Message, and original error (if any) fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) if reqErr, ok := err.(awserr.RequestFailure); ok { // A service error occurred fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) } } else { // This case should never be hit, The SDK should alwsy return an // error which satisfies the awserr.Error interface. fmt.Println(err.Error()) } } // Pretty-print the response data. fmt.Println(awsutil.StringValue(resp)) }
Output:
func (*DirectoryService) ConnectDirectoryRequest ¶
func (c *DirectoryService) ConnectDirectoryRequest(input *ConnectDirectoryInput) (req *aws.Request, output *ConnectDirectoryOutput)
ConnectDirectoryRequest generates a request for the ConnectDirectory operation.
func (*DirectoryService) CreateAlias ¶
func (c *DirectoryService) CreateAlias(input *CreateAliasInput) (*CreateAliasOutput, error)
Creates an alias for a directory and assigns the alias to the directory. The alias is used to construct the access URL for the directory, such as http://<alias>.awsapps.com.
After an alias has been created, it cannot be deleted or reused, so this
operation should only be used when absolutely necessary.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/directoryservice" ) func main() { svc := directoryservice.New(nil) params := &directoryservice.CreateAliasInput{ Alias: aws.String("AliasName"), // Required DirectoryID: aws.String("DirectoryId"), // Required } resp, err := svc.CreateAlias(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok { // Generic AWS Error with Code, Message, and original error (if any) fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) if reqErr, ok := err.(awserr.RequestFailure); ok { // A service error occurred fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) } } else { // This case should never be hit, The SDK should alwsy return an // error which satisfies the awserr.Error interface. fmt.Println(err.Error()) } } // Pretty-print the response data. fmt.Println(awsutil.StringValue(resp)) }
Output:
func (*DirectoryService) CreateAliasRequest ¶
func (c *DirectoryService) CreateAliasRequest(input *CreateAliasInput) (req *aws.Request, output *CreateAliasOutput)
CreateAliasRequest generates a request for the CreateAlias operation.
func (*DirectoryService) CreateComputer ¶
func (c *DirectoryService) CreateComputer(input *CreateComputerInput) (*CreateComputerOutput, error)
Creates a computer account in the specified directory, and joins the computer to the directory.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/directoryservice" ) func main() { svc := directoryservice.New(nil) params := &directoryservice.CreateComputerInput{ ComputerName: aws.String("ComputerName"), // Required DirectoryID: aws.String("DirectoryId"), // Required Password: aws.String("ComputerPassword"), // Required ComputerAttributes: []*directoryservice.Attribute{ &directoryservice.Attribute{ // Required Name: aws.String("AttributeName"), Value: aws.String("AttributeValue"), }, // More values... }, OrganizationalUnitDistinguishedName: aws.String("OrganizationalUnitDN"), } resp, err := svc.CreateComputer(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok { // Generic AWS Error with Code, Message, and original error (if any) fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) if reqErr, ok := err.(awserr.RequestFailure); ok { // A service error occurred fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) } } else { // This case should never be hit, The SDK should alwsy return an // error which satisfies the awserr.Error interface. fmt.Println(err.Error()) } } // Pretty-print the response data. fmt.Println(awsutil.StringValue(resp)) }
Output:
func (*DirectoryService) CreateComputerRequest ¶
func (c *DirectoryService) CreateComputerRequest(input *CreateComputerInput) (req *aws.Request, output *CreateComputerOutput)
CreateComputerRequest generates a request for the CreateComputer operation.
func (*DirectoryService) CreateDirectory ¶
func (c *DirectoryService) CreateDirectory(input *CreateDirectoryInput) (*CreateDirectoryOutput, error)
Creates a Simple AD directory.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/directoryservice" ) func main() { svc := directoryservice.New(nil) params := &directoryservice.CreateDirectoryInput{ Name: aws.String("DirectoryName"), // Required Password: aws.String("Password"), // Required Size: aws.String("DirectorySize"), // Required Description: aws.String("Description"), ShortName: aws.String("DirectoryShortName"), VPCSettings: &directoryservice.DirectoryVPCSettings{ SubnetIDs: []*string{ // Required aws.String("SubnetId"), // Required // More values... }, VPCID: aws.String("VpcId"), // Required }, } resp, err := svc.CreateDirectory(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok { // Generic AWS Error with Code, Message, and original error (if any) fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) if reqErr, ok := err.(awserr.RequestFailure); ok { // A service error occurred fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) } } else { // This case should never be hit, The SDK should alwsy return an // error which satisfies the awserr.Error interface. fmt.Println(err.Error()) } } // Pretty-print the response data. fmt.Println(awsutil.StringValue(resp)) }
Output:
func (*DirectoryService) CreateDirectoryRequest ¶
func (c *DirectoryService) CreateDirectoryRequest(input *CreateDirectoryInput) (req *aws.Request, output *CreateDirectoryOutput)
CreateDirectoryRequest generates a request for the CreateDirectory operation.
func (*DirectoryService) CreateSnapshot ¶
func (c *DirectoryService) CreateSnapshot(input *CreateSnapshotInput) (*CreateSnapshotOutput, error)
Creates a snapshot of an existing directory.
You cannot take snapshots of extended or connected directories.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/directoryservice" ) func main() { svc := directoryservice.New(nil) params := &directoryservice.CreateSnapshotInput{ DirectoryID: aws.String("DirectoryId"), // Required Name: aws.String("SnapshotName"), } resp, err := svc.CreateSnapshot(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok { // Generic AWS Error with Code, Message, and original error (if any) fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) if reqErr, ok := err.(awserr.RequestFailure); ok { // A service error occurred fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) } } else { // This case should never be hit, The SDK should alwsy return an // error which satisfies the awserr.Error interface. fmt.Println(err.Error()) } } // Pretty-print the response data. fmt.Println(awsutil.StringValue(resp)) }
Output:
func (*DirectoryService) CreateSnapshotRequest ¶
func (c *DirectoryService) CreateSnapshotRequest(input *CreateSnapshotInput) (req *aws.Request, output *CreateSnapshotOutput)
CreateSnapshotRequest generates a request for the CreateSnapshot operation.
func (*DirectoryService) DeleteDirectory ¶
func (c *DirectoryService) DeleteDirectory(input *DeleteDirectoryInput) (*DeleteDirectoryOutput, error)
Deletes an AWS Directory Service directory.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/directoryservice" ) func main() { svc := directoryservice.New(nil) params := &directoryservice.DeleteDirectoryInput{ DirectoryID: aws.String("DirectoryId"), // Required } resp, err := svc.DeleteDirectory(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok { // Generic AWS Error with Code, Message, and original error (if any) fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) if reqErr, ok := err.(awserr.RequestFailure); ok { // A service error occurred fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) } } else { // This case should never be hit, The SDK should alwsy return an // error which satisfies the awserr.Error interface. fmt.Println(err.Error()) } } // Pretty-print the response data. fmt.Println(awsutil.StringValue(resp)) }
Output:
func (*DirectoryService) DeleteDirectoryRequest ¶
func (c *DirectoryService) DeleteDirectoryRequest(input *DeleteDirectoryInput) (req *aws.Request, output *DeleteDirectoryOutput)
DeleteDirectoryRequest generates a request for the DeleteDirectory operation.
func (*DirectoryService) DeleteSnapshot ¶
func (c *DirectoryService) DeleteSnapshot(input *DeleteSnapshotInput) (*DeleteSnapshotOutput, error)
Deletes a directory snapshot.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/directoryservice" ) func main() { svc := directoryservice.New(nil) params := &directoryservice.DeleteSnapshotInput{ SnapshotID: aws.String("SnapshotId"), // Required } resp, err := svc.DeleteSnapshot(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok { // Generic AWS Error with Code, Message, and original error (if any) fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) if reqErr, ok := err.(awserr.RequestFailure); ok { // A service error occurred fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) } } else { // This case should never be hit, The SDK should alwsy return an // error which satisfies the awserr.Error interface. fmt.Println(err.Error()) } } // Pretty-print the response data. fmt.Println(awsutil.StringValue(resp)) }
Output:
func (*DirectoryService) DeleteSnapshotRequest ¶
func (c *DirectoryService) DeleteSnapshotRequest(input *DeleteSnapshotInput) (req *aws.Request, output *DeleteSnapshotOutput)
DeleteSnapshotRequest generates a request for the DeleteSnapshot operation.
func (*DirectoryService) DescribeDirectories ¶
func (c *DirectoryService) DescribeDirectories(input *DescribeDirectoriesInput) (*DescribeDirectoriesOutput, error)
Obtains information about the directories that belong to this account.
You can retrieve information about specific directories by passing the directory identifiers in the DirectoryIds parameter. Otherwise, all directories that belong to the current account are returned.
This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the DescribeDirectoriesResult.NextToken member contains a token that you pass in the next call to DescribeDirectories to retrieve the next set of items.
You can also specify a maximum number of return results with the Limit parameter.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/directoryservice" ) func main() { svc := directoryservice.New(nil) params := &directoryservice.DescribeDirectoriesInput{ DirectoryIDs: []*string{ aws.String("DirectoryId"), // Required // More values... }, Limit: aws.Long(1), NextToken: aws.String("NextToken"), } resp, err := svc.DescribeDirectories(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok { // Generic AWS Error with Code, Message, and original error (if any) fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) if reqErr, ok := err.(awserr.RequestFailure); ok { // A service error occurred fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) } } else { // This case should never be hit, The SDK should alwsy return an // error which satisfies the awserr.Error interface. fmt.Println(err.Error()) } } // Pretty-print the response data. fmt.Println(awsutil.StringValue(resp)) }
Output:
func (*DirectoryService) DescribeDirectoriesRequest ¶
func (c *DirectoryService) DescribeDirectoriesRequest(input *DescribeDirectoriesInput) (req *aws.Request, output *DescribeDirectoriesOutput)
DescribeDirectoriesRequest generates a request for the DescribeDirectories operation.
func (*DirectoryService) DescribeSnapshots ¶
func (c *DirectoryService) DescribeSnapshots(input *DescribeSnapshotsInput) (*DescribeSnapshotsOutput, error)
Obtains information about the directory snapshots that belong to this account.
This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the DescribeSnapshots.NextToken member contains a token that you pass in the next call to DescribeSnapshots to retrieve the next set of items.
You can also specify a maximum number of return results with the Limit parameter.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/directoryservice" ) func main() { svc := directoryservice.New(nil) params := &directoryservice.DescribeSnapshotsInput{ DirectoryID: aws.String("DirectoryId"), Limit: aws.Long(1), NextToken: aws.String("NextToken"), SnapshotIDs: []*string{ aws.String("SnapshotId"), // Required // More values... }, } resp, err := svc.DescribeSnapshots(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok { // Generic AWS Error with Code, Message, and original error (if any) fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) if reqErr, ok := err.(awserr.RequestFailure); ok { // A service error occurred fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) } } else { // This case should never be hit, The SDK should alwsy return an // error which satisfies the awserr.Error interface. fmt.Println(err.Error()) } } // Pretty-print the response data. fmt.Println(awsutil.StringValue(resp)) }
Output:
func (*DirectoryService) DescribeSnapshotsRequest ¶
func (c *DirectoryService) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (req *aws.Request, output *DescribeSnapshotsOutput)
DescribeSnapshotsRequest generates a request for the DescribeSnapshots operation.
func (*DirectoryService) DisableRadius ¶
func (c *DirectoryService) DisableRadius(input *DisableRadiusInput) (*DisableRadiusOutput, error)
Disables multi-factor authentication (MFA) with Remote Authentication Dial In User Service (RADIUS) for an AD Connector directory.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/directoryservice" ) func main() { svc := directoryservice.New(nil) params := &directoryservice.DisableRadiusInput{ DirectoryID: aws.String("DirectoryId"), // Required } resp, err := svc.DisableRadius(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok { // Generic AWS Error with Code, Message, and original error (if any) fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) if reqErr, ok := err.(awserr.RequestFailure); ok { // A service error occurred fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) } } else { // This case should never be hit, The SDK should alwsy return an // error which satisfies the awserr.Error interface. fmt.Println(err.Error()) } } // Pretty-print the response data. fmt.Println(awsutil.StringValue(resp)) }
Output:
func (*DirectoryService) DisableRadiusRequest ¶
func (c *DirectoryService) DisableRadiusRequest(input *DisableRadiusInput) (req *aws.Request, output *DisableRadiusOutput)
DisableRadiusRequest generates a request for the DisableRadius operation.
func (*DirectoryService) DisableSSO ¶
func (c *DirectoryService) DisableSSO(input *DisableSSOInput) (*DisableSSOOutput, error)
Disables single-sign on for a directory.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/directoryservice" ) func main() { svc := directoryservice.New(nil) params := &directoryservice.DisableSSOInput{ DirectoryID: aws.String("DirectoryId"), // Required Password: aws.String("ConnectPassword"), UserName: aws.String("UserName"), } resp, err := svc.DisableSSO(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok { // Generic AWS Error with Code, Message, and original error (if any) fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) if reqErr, ok := err.(awserr.RequestFailure); ok { // A service error occurred fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) } } else { // This case should never be hit, The SDK should alwsy return an // error which satisfies the awserr.Error interface. fmt.Println(err.Error()) } } // Pretty-print the response data. fmt.Println(awsutil.StringValue(resp)) }
Output:
func (*DirectoryService) DisableSSORequest ¶
func (c *DirectoryService) DisableSSORequest(input *DisableSSOInput) (req *aws.Request, output *DisableSSOOutput)
DisableSSORequest generates a request for the DisableSSO operation.
func (*DirectoryService) EnableRadius ¶
func (c *DirectoryService) EnableRadius(input *EnableRadiusInput) (*EnableRadiusOutput, error)
Enables multi-factor authentication (MFA) with Remote Authentication Dial In User Service (RADIUS) for an AD Connector directory.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/directoryservice" ) func main() { svc := directoryservice.New(nil) params := &directoryservice.EnableRadiusInput{ DirectoryID: aws.String("DirectoryId"), // Required RadiusSettings: &directoryservice.RadiusSettings{ // Required AuthenticationProtocol: aws.String("RadiusAuthenticationProtocol"), DisplayLabel: aws.String("RadiusDisplayLabel"), RadiusPort: aws.Long(1), RadiusRetries: aws.Long(1), RadiusServers: []*string{ aws.String("Server"), // Required // More values... }, RadiusTimeout: aws.Long(1), SharedSecret: aws.String("RadiusSharedSecret"), UseSameUsername: aws.Boolean(true), }, } resp, err := svc.EnableRadius(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok { // Generic AWS Error with Code, Message, and original error (if any) fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) if reqErr, ok := err.(awserr.RequestFailure); ok { // A service error occurred fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) } } else { // This case should never be hit, The SDK should alwsy return an // error which satisfies the awserr.Error interface. fmt.Println(err.Error()) } } // Pretty-print the response data. fmt.Println(awsutil.StringValue(resp)) }
Output:
func (*DirectoryService) EnableRadiusRequest ¶
func (c *DirectoryService) EnableRadiusRequest(input *EnableRadiusInput) (req *aws.Request, output *EnableRadiusOutput)
EnableRadiusRequest generates a request for the EnableRadius operation.
func (*DirectoryService) EnableSSO ¶
func (c *DirectoryService) EnableSSO(input *EnableSSOInput) (*EnableSSOOutput, error)
Enables single-sign on for a directory.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/directoryservice" ) func main() { svc := directoryservice.New(nil) params := &directoryservice.EnableSSOInput{ DirectoryID: aws.String("DirectoryId"), // Required Password: aws.String("ConnectPassword"), UserName: aws.String("UserName"), } resp, err := svc.EnableSSO(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok { // Generic AWS Error with Code, Message, and original error (if any) fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) if reqErr, ok := err.(awserr.RequestFailure); ok { // A service error occurred fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) } } else { // This case should never be hit, The SDK should alwsy return an // error which satisfies the awserr.Error interface. fmt.Println(err.Error()) } } // Pretty-print the response data. fmt.Println(awsutil.StringValue(resp)) }
Output:
func (*DirectoryService) EnableSSORequest ¶
func (c *DirectoryService) EnableSSORequest(input *EnableSSOInput) (req *aws.Request, output *EnableSSOOutput)
EnableSSORequest generates a request for the EnableSSO operation.
func (*DirectoryService) GetDirectoryLimits ¶
func (c *DirectoryService) GetDirectoryLimits(input *GetDirectoryLimitsInput) (*GetDirectoryLimitsOutput, error)
Obtains directory limit information for the current region.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/directoryservice" ) func main() { svc := directoryservice.New(nil) var params *directoryservice.GetDirectoryLimitsInput resp, err := svc.GetDirectoryLimits(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok { // Generic AWS Error with Code, Message, and original error (if any) fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) if reqErr, ok := err.(awserr.RequestFailure); ok { // A service error occurred fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) } } else { // This case should never be hit, The SDK should alwsy return an // error which satisfies the awserr.Error interface. fmt.Println(err.Error()) } } // Pretty-print the response data. fmt.Println(awsutil.StringValue(resp)) }
Output:
func (*DirectoryService) GetDirectoryLimitsRequest ¶
func (c *DirectoryService) GetDirectoryLimitsRequest(input *GetDirectoryLimitsInput) (req *aws.Request, output *GetDirectoryLimitsOutput)
GetDirectoryLimitsRequest generates a request for the GetDirectoryLimits operation.
func (*DirectoryService) GetSnapshotLimits ¶
func (c *DirectoryService) GetSnapshotLimits(input *GetSnapshotLimitsInput) (*GetSnapshotLimitsOutput, error)
Obtains the manual snapshot limits for a directory.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/directoryservice" ) func main() { svc := directoryservice.New(nil) params := &directoryservice.GetSnapshotLimitsInput{ DirectoryID: aws.String("DirectoryId"), // Required } resp, err := svc.GetSnapshotLimits(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok { // Generic AWS Error with Code, Message, and original error (if any) fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) if reqErr, ok := err.(awserr.RequestFailure); ok { // A service error occurred fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) } } else { // This case should never be hit, The SDK should alwsy return an // error which satisfies the awserr.Error interface. fmt.Println(err.Error()) } } // Pretty-print the response data. fmt.Println(awsutil.StringValue(resp)) }
Output:
func (*DirectoryService) GetSnapshotLimitsRequest ¶
func (c *DirectoryService) GetSnapshotLimitsRequest(input *GetSnapshotLimitsInput) (req *aws.Request, output *GetSnapshotLimitsOutput)
GetSnapshotLimitsRequest generates a request for the GetSnapshotLimits operation.
func (*DirectoryService) RestoreFromSnapshot ¶
func (c *DirectoryService) RestoreFromSnapshot(input *RestoreFromSnapshotInput) (*RestoreFromSnapshotOutput, error)
Restores a directory using an existing directory snapshot.
When you restore a directory from a snapshot, any changes made to the directory after the snapshot date are overwritten.
This action returns as soon as the restore operation is initiated. You can monitor the progress of the restore operation by calling the DescribeDirectories operation with the directory identifier. When the DirectoryDescription.Stage value changes to Active, the restore operation is complete.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/directoryservice" ) func main() { svc := directoryservice.New(nil) params := &directoryservice.RestoreFromSnapshotInput{ SnapshotID: aws.String("SnapshotId"), // Required } resp, err := svc.RestoreFromSnapshot(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok { // Generic AWS Error with Code, Message, and original error (if any) fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) if reqErr, ok := err.(awserr.RequestFailure); ok { // A service error occurred fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) } } else { // This case should never be hit, The SDK should alwsy return an // error which satisfies the awserr.Error interface. fmt.Println(err.Error()) } } // Pretty-print the response data. fmt.Println(awsutil.StringValue(resp)) }
Output:
func (*DirectoryService) RestoreFromSnapshotRequest ¶
func (c *DirectoryService) RestoreFromSnapshotRequest(input *RestoreFromSnapshotInput) (req *aws.Request, output *RestoreFromSnapshotOutput)
RestoreFromSnapshotRequest generates a request for the RestoreFromSnapshot operation.
func (*DirectoryService) UpdateRadius ¶
func (c *DirectoryService) UpdateRadius(input *UpdateRadiusInput) (*UpdateRadiusOutput, error)
Updates the Remote Authentication Dial In User Service (RADIUS) server information for an AD Connector directory.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/directoryservice" ) func main() { svc := directoryservice.New(nil) params := &directoryservice.UpdateRadiusInput{ DirectoryID: aws.String("DirectoryId"), // Required RadiusSettings: &directoryservice.RadiusSettings{ // Required AuthenticationProtocol: aws.String("RadiusAuthenticationProtocol"), DisplayLabel: aws.String("RadiusDisplayLabel"), RadiusPort: aws.Long(1), RadiusRetries: aws.Long(1), RadiusServers: []*string{ aws.String("Server"), // Required // More values... }, RadiusTimeout: aws.Long(1), SharedSecret: aws.String("RadiusSharedSecret"), UseSameUsername: aws.Boolean(true), }, } resp, err := svc.UpdateRadius(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok { // Generic AWS Error with Code, Message, and original error (if any) fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) if reqErr, ok := err.(awserr.RequestFailure); ok { // A service error occurred fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) } } else { // This case should never be hit, The SDK should alwsy return an // error which satisfies the awserr.Error interface. fmt.Println(err.Error()) } } // Pretty-print the response data. fmt.Println(awsutil.StringValue(resp)) }
Output:
func (*DirectoryService) UpdateRadiusRequest ¶
func (c *DirectoryService) UpdateRadiusRequest(input *UpdateRadiusInput) (req *aws.Request, output *UpdateRadiusOutput)
UpdateRadiusRequest generates a request for the UpdateRadius operation.
type DirectoryVPCSettings ¶
type DirectoryVPCSettings struct { // The identifiers of the subnets for the directory servers. The two subnets // must be in different Availability Zones. AWS Directory Service creates a // directory server and a DNS server in each of these subnets. SubnetIDs []*string `locationName:"SubnetIds" type:"list" required:"true"` // The identifier of the VPC to create the Simple AD directory in. VPCID *string `locationName:"VpcId" type:"string" required:"true"` // contains filtered or unexported fields }
Contains information for the CreateDirectory operation when a Simple AD directory is being created.
type DirectoryVPCSettingsDescription ¶
type DirectoryVPCSettingsDescription struct { // The list of Availability Zones that the directory is in. AvailabilityZones []*string `type:"list"` // The security group identifier for the directory. SecurityGroupID *string `locationName:"SecurityGroupId" type:"string"` // The identifiers of the subnets for the directory servers. SubnetIDs []*string `locationName:"SubnetIds" type:"list"` // The identifier of the VPC that the directory is in. VPCID *string `locationName:"VpcId" type:"string"` // contains filtered or unexported fields }
Contains information about a Simple AD directory.
type DisableRadiusInput ¶
type DisableRadiusInput struct { // The identifier of the directory to disable MFA for. DirectoryID *string `locationName:"DirectoryId" type:"string" required:"true"` // contains filtered or unexported fields }
Contains the inputs for the DisableRadius operation.
type DisableRadiusOutput ¶
type DisableRadiusOutput struct {
// contains filtered or unexported fields
}
Contains the results of the DisableRadius operation.
type DisableSSOInput ¶
type DisableSSOInput struct { // The identifier of the directory to disable single-sign on for. DirectoryID *string `locationName:"DirectoryId" type:"string" required:"true"` // The password of an alternate account to use to disable single-sign on. This // is only used for AD Connector directories. See the UserName parameter for // more information. Password *string `type:"string"` // The username of an alternate account to use to disable single-sign on. This // is only used for AD Connector directories. This account must have privileges // to remove a service principle name. // // If the AD Connector service account does not have privileges to remove a // service principle name, you can specify an alternate account with the UserName // and Password parameters. These credentials are only used to disable single // sign-on and are not stored by the service. The AD Connector service account // is not changed. UserName *string `type:"string"` // contains filtered or unexported fields }
Contains the inputs for the DisableSso operation.
type DisableSSOOutput ¶
type DisableSSOOutput struct {
// contains filtered or unexported fields
}
Contains the results of the DisableSso operation.
type EnableRadiusInput ¶
type EnableRadiusInput struct { // The identifier of the directory to enable MFA for. DirectoryID *string `locationName:"DirectoryId" type:"string" required:"true"` // A RadiusSettings object that contains information about the RADIUS server. RadiusSettings *RadiusSettings `type:"structure" required:"true"` // contains filtered or unexported fields }
Contains the inputs for the EnableRadius operation.
type EnableRadiusOutput ¶
type EnableRadiusOutput struct {
// contains filtered or unexported fields
}
Contains the results of the EnableRadius operation.
type EnableSSOInput ¶
type EnableSSOInput struct { // The identifier of the directory to enable single-sign on for. DirectoryID *string `locationName:"DirectoryId" type:"string" required:"true"` // The password of an alternate account to use to enable single-sign on. This // is only used for AD Connector directories. See the UserName parameter for // more information. Password *string `type:"string"` // The username of an alternate account to use to enable single-sign on. This // is only used for AD Connector directories. This account must have privileges // to add a service principle name. // // If the AD Connector service account does not have privileges to add a service // principle name, you can specify an alternate account with the UserName and // Password parameters. These credentials are only used to enable single sign-on // and are not stored by the service. The AD Connector service account is not // changed. UserName *string `type:"string"` // contains filtered or unexported fields }
Contains the inputs for the EnableSso operation.
type EnableSSOOutput ¶
type EnableSSOOutput struct {
// contains filtered or unexported fields
}
Contains the results of the EnableSso operation.
type GetDirectoryLimitsInput ¶
type GetDirectoryLimitsInput struct {
// contains filtered or unexported fields
}
Contains the inputs for the GetDirectoryLimits operation.
type GetDirectoryLimitsOutput ¶
type GetDirectoryLimitsOutput struct { // A DirectoryLimits object that contains the directory limits for the current // region. DirectoryLimits *DirectoryLimits `type:"structure"` // contains filtered or unexported fields }
Contains the results of the GetDirectoryLimits operation.
type GetSnapshotLimitsInput ¶
type GetSnapshotLimitsInput struct { // Contains the identifier of the directory to obtain the limits for. DirectoryID *string `locationName:"DirectoryId" type:"string" required:"true"` // contains filtered or unexported fields }
Contains the inputs for the GetSnapshotLimits operation.
type GetSnapshotLimitsOutput ¶
type GetSnapshotLimitsOutput struct { // A SnapshotLimits object that contains the manual snapshot limits for the // specified directory. SnapshotLimits *SnapshotLimits `type:"structure"` // contains filtered or unexported fields }
Contains the results of the GetSnapshotLimits operation.
type RadiusSettings ¶
type RadiusSettings struct { // The protocol specified for your RADIUS endpoints. AuthenticationProtocol *string `type:"string"` // Not currently used. DisplayLabel *string `type:"string"` // The port that your RADIUS server is using for communications. Your on-premises // network must allow inbound traffic over this port from the AWS Directory // Service servers. RadiusPort *int64 `type:"integer"` // The maximum number of times that communication with the RADIUS server is // attempted. RadiusRetries *int64 `type:"integer"` // An array of strings that contains the IP addresses of the RADIUS server endpoints, // or the IP addresses of your RADIUS server load balancer. RadiusServers []*string `type:"list"` // The amount of time, in seconds, to wait for the RADIUS server to respond. RadiusTimeout *int64 `type:"integer"` // created. SharedSecret *string `type:"string"` // Not currently used. UseSameUsername *bool `type:"boolean"` // contains filtered or unexported fields }
Contains information about a Remote Authentication Dial In User Service (RADIUS) server.
type RestoreFromSnapshotInput ¶
type RestoreFromSnapshotInput struct { // The identifier of the snapshot to restore from. SnapshotID *string `locationName:"SnapshotId" type:"string" required:"true"` // contains filtered or unexported fields }
An object representing the inputs for the RestoreFromSnapshot operation.
type RestoreFromSnapshotOutput ¶
type RestoreFromSnapshotOutput struct {
// contains filtered or unexported fields
}
Contains the results of the RestoreFromSnapshot operation.
type Snapshot ¶
type Snapshot struct { // The directory identifier. DirectoryID *string `locationName:"DirectoryId" type:"string"` // The descriptive name of the snapshot. Name *string `type:"string"` // The snapshot identifier. SnapshotID *string `locationName:"SnapshotId" type:"string"` // The date and time that the snapshot was taken. StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` // The snapshot status. Status *string `type:"string"` // The snapshot type. Type *string `type:"string"` // contains filtered or unexported fields }
Describes a directory snapshot.
type SnapshotLimits ¶
type SnapshotLimits struct { // The current number of manual snapshots of the directory. ManualSnapshotsCurrentCount *int64 `type:"integer"` // The maximum number of manual snapshots allowed. ManualSnapshotsLimit *int64 `type:"integer"` // Indicates if the manual snapshot limit has been reached. ManualSnapshotsLimitReached *bool `type:"boolean"` // contains filtered or unexported fields }
Contains manual snapshot limit information for a directory.
type UpdateRadiusInput ¶
type UpdateRadiusInput struct { // The identifier of the directory to update the RADIUS server information for. DirectoryID *string `locationName:"DirectoryId" type:"string" required:"true"` // A RadiusSettings object that contains information about the RADIUS server. RadiusSettings *RadiusSettings `type:"structure" required:"true"` // contains filtered or unexported fields }
Contains the inputs for the UpdateRadius operation.
type UpdateRadiusOutput ¶
type UpdateRadiusOutput struct {
// contains filtered or unexported fields
}
Contains the results of the UpdateRadius operation.
Directories ¶
Path | Synopsis |
---|---|
Package directoryserviceiface provides an interface for the AWS Directory Service.
|
Package directoryserviceiface provides an interface for the AWS Directory Service. |