mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Upgrade AWS SDK to the latest version
This commit is contained in:
+910
-382
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+13
-2
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package directoryserviceiface provides an interface to enable mocking the AWS Directory Service service client
|
||||
// for testing your code.
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
//
|
||||
// The best way to use this interface is so the SDK's service client's calls
|
||||
// can be stubbed out for unit testing your code with the SDK without needing
|
||||
// to inject custom request handlers into the the SDK's request pipeline.
|
||||
// to inject custom request handlers into the SDK's request pipeline.
|
||||
//
|
||||
// // myFunc uses an SDK service client to make a request to
|
||||
// // AWS Directory Service.
|
||||
@@ -132,6 +132,13 @@ type DirectoryServiceAPI interface {
|
||||
DescribeDirectoriesWithContext(aws.Context, *directoryservice.DescribeDirectoriesInput, ...request.Option) (*directoryservice.DescribeDirectoriesOutput, error)
|
||||
DescribeDirectoriesRequest(*directoryservice.DescribeDirectoriesInput) (*request.Request, *directoryservice.DescribeDirectoriesOutput)
|
||||
|
||||
DescribeDomainControllers(*directoryservice.DescribeDomainControllersInput) (*directoryservice.DescribeDomainControllersOutput, error)
|
||||
DescribeDomainControllersWithContext(aws.Context, *directoryservice.DescribeDomainControllersInput, ...request.Option) (*directoryservice.DescribeDomainControllersOutput, error)
|
||||
DescribeDomainControllersRequest(*directoryservice.DescribeDomainControllersInput) (*request.Request, *directoryservice.DescribeDomainControllersOutput)
|
||||
|
||||
DescribeDomainControllersPages(*directoryservice.DescribeDomainControllersInput, func(*directoryservice.DescribeDomainControllersOutput, bool) bool) error
|
||||
DescribeDomainControllersPagesWithContext(aws.Context, *directoryservice.DescribeDomainControllersInput, func(*directoryservice.DescribeDomainControllersOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribeEventTopics(*directoryservice.DescribeEventTopicsInput) (*directoryservice.DescribeEventTopicsOutput, error)
|
||||
DescribeEventTopicsWithContext(aws.Context, *directoryservice.DescribeEventTopicsInput, ...request.Option) (*directoryservice.DescribeEventTopicsOutput, error)
|
||||
DescribeEventTopicsRequest(*directoryservice.DescribeEventTopicsInput) (*request.Request, *directoryservice.DescribeEventTopicsOutput)
|
||||
@@ -204,6 +211,10 @@ type DirectoryServiceAPI interface {
|
||||
UpdateConditionalForwarderWithContext(aws.Context, *directoryservice.UpdateConditionalForwarderInput, ...request.Option) (*directoryservice.UpdateConditionalForwarderOutput, error)
|
||||
UpdateConditionalForwarderRequest(*directoryservice.UpdateConditionalForwarderInput) (*request.Request, *directoryservice.UpdateConditionalForwarderOutput)
|
||||
|
||||
UpdateNumberOfDomainControllers(*directoryservice.UpdateNumberOfDomainControllersInput) (*directoryservice.UpdateNumberOfDomainControllersOutput, error)
|
||||
UpdateNumberOfDomainControllersWithContext(aws.Context, *directoryservice.UpdateNumberOfDomainControllersInput, ...request.Option) (*directoryservice.UpdateNumberOfDomainControllersOutput, error)
|
||||
UpdateNumberOfDomainControllersRequest(*directoryservice.UpdateNumberOfDomainControllersInput) (*request.Request, *directoryservice.UpdateNumberOfDomainControllersOutput)
|
||||
|
||||
UpdateRadius(*directoryservice.UpdateRadiusInput) (*directoryservice.UpdateRadiusOutput, error)
|
||||
UpdateRadiusWithContext(aws.Context, *directoryservice.UpdateRadiusInput, ...request.Option) (*directoryservice.UpdateRadiusOutput, error)
|
||||
UpdateRadiusRequest(*directoryservice.UpdateRadiusInput) (*request.Request, *directoryservice.UpdateRadiusOutput)
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package directoryservice provides the client and types for making API
|
||||
// requests to AWS Directory Service.
|
||||
//
|
||||
// AWS Directory Service is a web service that makes it easy for you to setup
|
||||
// and run directories in the AWS cloud, or connect your AWS resources with
|
||||
// an existing on-premises Microsoft Active Directory. This guide provides detailed
|
||||
// information about AWS Directory Service operations, data types, parameters,
|
||||
// and errors. For information about AWS Directory Services features, see AWS
|
||||
// Directory Service (https://aws.amazon.com/directoryservice/) and the AWS
|
||||
// Directory Service Administration Guide (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/what_is.html).
|
||||
//
|
||||
// AWS provides SDKs that consist of libraries and sample code for various programming
|
||||
// languages and platforms (Java, Ruby, .Net, iOS, Android, etc.). The SDKs
|
||||
// provide a convenient way to create programmatic access to AWS Directory Service
|
||||
// and other AWS services. For more information about the AWS SDKs, including
|
||||
// how to download and install them, see Tools for Amazon Web Services (http://aws.amazon.com/tools/).
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16 for more information on this service.
|
||||
//
|
||||
// See directoryservice package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/directoryservice/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To AWS Directory Service with the SDK use the New function to create
|
||||
// a new service client. With that client you can make API requests to the service.
|
||||
// These clients are safe to use concurrently.
|
||||
//
|
||||
// See the SDK's documentation for more information on how to use the SDK.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/
|
||||
//
|
||||
// See aws.Config documentation for more information on configuring SDK clients.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
|
||||
//
|
||||
// See the AWS Directory Service client DirectoryService for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/directoryservice/#New
|
||||
package directoryservice
|
||||
+8
-1
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package directoryservice
|
||||
|
||||
@@ -30,6 +30,13 @@ const (
|
||||
// The specified directory is unavailable or could not be found.
|
||||
ErrCodeDirectoryUnavailableException = "DirectoryUnavailableException"
|
||||
|
||||
// ErrCodeDomainControllerLimitExceededException for service response error code
|
||||
// "DomainControllerLimitExceededException".
|
||||
//
|
||||
// The maximum allowed number of domain controllers per directory was exceeded.
|
||||
// The default limit per directory is 20 domain controllers.
|
||||
ErrCodeDomainControllerLimitExceededException = "DomainControllerLimitExceededException"
|
||||
|
||||
// ErrCodeEntityAlreadyExistsException for service response error code
|
||||
// "EntityAlreadyExistsException".
|
||||
//
|
||||
|
||||
-971
@@ -1,971 +0,0 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package directoryservice_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/directoryservice"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleDirectoryService_AddIpRoutes() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.AddIpRoutesInput{
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
IpRoutes: []*directoryservice.IpRoute{ // Required
|
||||
{ // Required
|
||||
CidrIp: aws.String("CidrIp"),
|
||||
Description: aws.String("Description"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
UpdateSecurityGroupForDirectoryControllers: aws.Bool(true),
|
||||
}
|
||||
resp, err := svc.AddIpRoutes(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_AddTagsToResource() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.AddTagsToResourceInput{
|
||||
ResourceId: aws.String("ResourceId"), // Required
|
||||
Tags: []*directoryservice.Tag{ // Required
|
||||
{ // Required
|
||||
Key: aws.String("TagKey"), // Required
|
||||
Value: aws.String("TagValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.AddTagsToResource(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_CancelSchemaExtension() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.CancelSchemaExtensionInput{
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
SchemaExtensionId: aws.String("SchemaExtensionId"), // Required
|
||||
}
|
||||
resp, err := svc.CancelSchemaExtension(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_ConnectDirectory() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
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 {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_CreateAlias() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.CreateAliasInput{
|
||||
Alias: aws.String("AliasName"), // Required
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
}
|
||||
resp, err := svc.CreateAlias(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_CreateComputer() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.CreateComputerInput{
|
||||
ComputerName: aws.String("ComputerName"), // Required
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
Password: aws.String("ComputerPassword"), // Required
|
||||
ComputerAttributes: []*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 {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_CreateConditionalForwarder() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.CreateConditionalForwarderInput{
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
DnsIpAddrs: []*string{ // Required
|
||||
aws.String("IpAddr"), // Required
|
||||
// More values...
|
||||
},
|
||||
RemoteDomainName: aws.String("RemoteDomainName"), // Required
|
||||
}
|
||||
resp, err := svc.CreateConditionalForwarder(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_CreateDirectory() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
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 {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_CreateMicrosoftAD() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.CreateMicrosoftADInput{
|
||||
Name: aws.String("DirectoryName"), // Required
|
||||
Password: aws.String("Password"), // Required
|
||||
VpcSettings: &directoryservice.DirectoryVpcSettings{ // Required
|
||||
SubnetIds: []*string{ // Required
|
||||
aws.String("SubnetId"), // Required
|
||||
// More values...
|
||||
},
|
||||
VpcId: aws.String("VpcId"), // Required
|
||||
},
|
||||
Description: aws.String("Description"),
|
||||
ShortName: aws.String("DirectoryShortName"),
|
||||
}
|
||||
resp, err := svc.CreateMicrosoftAD(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_CreateSnapshot() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.CreateSnapshotInput{
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
Name: aws.String("SnapshotName"),
|
||||
}
|
||||
resp, err := svc.CreateSnapshot(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_CreateTrust() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.CreateTrustInput{
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
RemoteDomainName: aws.String("RemoteDomainName"), // Required
|
||||
TrustDirection: aws.String("TrustDirection"), // Required
|
||||
TrustPassword: aws.String("TrustPassword"), // Required
|
||||
ConditionalForwarderIpAddrs: []*string{
|
||||
aws.String("IpAddr"), // Required
|
||||
// More values...
|
||||
},
|
||||
TrustType: aws.String("TrustType"),
|
||||
}
|
||||
resp, err := svc.CreateTrust(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_DeleteConditionalForwarder() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.DeleteConditionalForwarderInput{
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
RemoteDomainName: aws.String("RemoteDomainName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteConditionalForwarder(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_DeleteDirectory() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.DeleteDirectoryInput{
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteDirectory(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_DeleteSnapshot() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.DeleteSnapshotInput{
|
||||
SnapshotId: aws.String("SnapshotId"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteSnapshot(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_DeleteTrust() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.DeleteTrustInput{
|
||||
TrustId: aws.String("TrustId"), // Required
|
||||
DeleteAssociatedConditionalForwarder: aws.Bool(true),
|
||||
}
|
||||
resp, err := svc.DeleteTrust(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_DeregisterEventTopic() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.DeregisterEventTopicInput{
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
TopicName: aws.String("TopicName"), // Required
|
||||
}
|
||||
resp, err := svc.DeregisterEventTopic(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_DescribeConditionalForwarders() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.DescribeConditionalForwardersInput{
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
RemoteDomainNames: []*string{
|
||||
aws.String("RemoteDomainName"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeConditionalForwarders(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_DescribeDirectories() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.DescribeDirectoriesInput{
|
||||
DirectoryIds: []*string{
|
||||
aws.String("DirectoryId"), // Required
|
||||
// More values...
|
||||
},
|
||||
Limit: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.DescribeDirectories(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_DescribeEventTopics() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.DescribeEventTopicsInput{
|
||||
DirectoryId: aws.String("DirectoryId"),
|
||||
TopicNames: []*string{
|
||||
aws.String("TopicName"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeEventTopics(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_DescribeSnapshots() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.DescribeSnapshotsInput{
|
||||
DirectoryId: aws.String("DirectoryId"),
|
||||
Limit: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
SnapshotIds: []*string{
|
||||
aws.String("SnapshotId"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeSnapshots(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_DescribeTrusts() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.DescribeTrustsInput{
|
||||
DirectoryId: aws.String("DirectoryId"),
|
||||
Limit: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
TrustIds: []*string{
|
||||
aws.String("TrustId"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeTrusts(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_DisableRadius() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.DisableRadiusInput{
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
}
|
||||
resp, err := svc.DisableRadius(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_DisableSso() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.DisableSsoInput{
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
Password: aws.String("ConnectPassword"),
|
||||
UserName: aws.String("UserName"),
|
||||
}
|
||||
resp, err := svc.DisableSso(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_EnableRadius() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.EnableRadiusInput{
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
RadiusSettings: &directoryservice.RadiusSettings{ // Required
|
||||
AuthenticationProtocol: aws.String("RadiusAuthenticationProtocol"),
|
||||
DisplayLabel: aws.String("RadiusDisplayLabel"),
|
||||
RadiusPort: aws.Int64(1),
|
||||
RadiusRetries: aws.Int64(1),
|
||||
RadiusServers: []*string{
|
||||
aws.String("Server"), // Required
|
||||
// More values...
|
||||
},
|
||||
RadiusTimeout: aws.Int64(1),
|
||||
SharedSecret: aws.String("RadiusSharedSecret"),
|
||||
UseSameUsername: aws.Bool(true),
|
||||
},
|
||||
}
|
||||
resp, err := svc.EnableRadius(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_EnableSso() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.EnableSsoInput{
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
Password: aws.String("ConnectPassword"),
|
||||
UserName: aws.String("UserName"),
|
||||
}
|
||||
resp, err := svc.EnableSso(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_GetDirectoryLimits() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
var params *directoryservice.GetDirectoryLimitsInput
|
||||
resp, err := svc.GetDirectoryLimits(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_GetSnapshotLimits() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.GetSnapshotLimitsInput{
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
}
|
||||
resp, err := svc.GetSnapshotLimits(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_ListIpRoutes() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.ListIpRoutesInput{
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
Limit: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListIpRoutes(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_ListSchemaExtensions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.ListSchemaExtensionsInput{
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
Limit: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListSchemaExtensions(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_ListTagsForResource() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.ListTagsForResourceInput{
|
||||
ResourceId: aws.String("ResourceId"), // Required
|
||||
Limit: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListTagsForResource(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_RegisterEventTopic() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.RegisterEventTopicInput{
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
TopicName: aws.String("TopicName"), // Required
|
||||
}
|
||||
resp, err := svc.RegisterEventTopic(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_RemoveIpRoutes() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.RemoveIpRoutesInput{
|
||||
CidrIps: []*string{ // Required
|
||||
aws.String("CidrIp"), // Required
|
||||
// More values...
|
||||
},
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
}
|
||||
resp, err := svc.RemoveIpRoutes(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_RemoveTagsFromResource() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.RemoveTagsFromResourceInput{
|
||||
ResourceId: aws.String("ResourceId"), // Required
|
||||
TagKeys: []*string{ // Required
|
||||
aws.String("TagKey"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.RemoveTagsFromResource(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_RestoreFromSnapshot() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.RestoreFromSnapshotInput{
|
||||
SnapshotId: aws.String("SnapshotId"), // Required
|
||||
}
|
||||
resp, err := svc.RestoreFromSnapshot(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_StartSchemaExtension() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.StartSchemaExtensionInput{
|
||||
CreateSnapshotBeforeSchemaExtension: aws.Bool(true), // Required
|
||||
Description: aws.String("Description"), // Required
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
LdifContent: aws.String("LdifContent"), // Required
|
||||
}
|
||||
resp, err := svc.StartSchemaExtension(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_UpdateConditionalForwarder() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.UpdateConditionalForwarderInput{
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
DnsIpAddrs: []*string{ // Required
|
||||
aws.String("IpAddr"), // Required
|
||||
// More values...
|
||||
},
|
||||
RemoteDomainName: aws.String("RemoteDomainName"), // Required
|
||||
}
|
||||
resp, err := svc.UpdateConditionalForwarder(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_UpdateRadius() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.UpdateRadiusInput{
|
||||
DirectoryId: aws.String("DirectoryId"), // Required
|
||||
RadiusSettings: &directoryservice.RadiusSettings{ // Required
|
||||
AuthenticationProtocol: aws.String("RadiusAuthenticationProtocol"),
|
||||
DisplayLabel: aws.String("RadiusDisplayLabel"),
|
||||
RadiusPort: aws.Int64(1),
|
||||
RadiusRetries: aws.Int64(1),
|
||||
RadiusServers: []*string{
|
||||
aws.String("Server"), // Required
|
||||
// More values...
|
||||
},
|
||||
RadiusTimeout: aws.Int64(1),
|
||||
SharedSecret: aws.String("RadiusSharedSecret"),
|
||||
UseSameUsername: aws.Bool(true),
|
||||
},
|
||||
}
|
||||
resp, err := svc.UpdateRadius(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleDirectoryService_VerifyTrust() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := directoryservice.New(sess)
|
||||
|
||||
params := &directoryservice.VerifyTrustInput{
|
||||
TrustId: aws.String("TrustId"), // Required
|
||||
}
|
||||
resp, err := svc.VerifyTrust(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
+6
-16
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package directoryservice
|
||||
|
||||
@@ -11,22 +11,12 @@ import (
|
||||
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
|
||||
)
|
||||
|
||||
// AWS Directory Service is a web service that makes it easy for you to setup
|
||||
// and run directories in the AWS cloud, or connect your AWS resources with
|
||||
// an existing on-premises Microsoft Active Directory. This guide provides detailed
|
||||
// information about AWS Directory Service operations, data types, parameters,
|
||||
// and errors. For information about AWS Directory Services features, see AWS
|
||||
// Directory Service (https://aws.amazon.com/directoryservice/) and the AWS
|
||||
// Directory Service Administration Guide (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/what_is.html).
|
||||
// DirectoryService provides the API operation methods for making requests to
|
||||
// AWS Directory Service. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// AWS provides SDKs that consist of libraries and sample code for various programming
|
||||
// languages and platforms (Java, Ruby, .Net, iOS, Android, etc.). The SDKs
|
||||
// provide a convenient way to create programmatic access to AWS Directory Service
|
||||
// and other AWS services. For more information about the AWS SDKs, including
|
||||
// how to download and install them, see Tools for Amazon Web Services (http://aws.amazon.com/tools/).
|
||||
// The service client's operations are safe to be used concurrently.
|
||||
// It is not safe to mutate any of the client's properties though.
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16
|
||||
// DirectoryService methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type DirectoryService struct {
|
||||
*client.Client
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user