text:
# This file is auto-generated by AWSMetadata.jl
using AWS
using AWS.AWSServices: directory_service
using AWS.Compat
using AWS.UUIDs

"""
    accept_shared_directory(shared_directory_id)
    accept_shared_directory(shared_directory_id, params::Dict{String,<:Any})

Accepts a directory sharing request that was sent from the directory owner account.

# Arguments
- `shared_directory_id`: Identifier of the shared directory in the directory consumer
  account. This identifier is different for each directory owner account.

"""
accept_shared_directory(SharedDirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("AcceptSharedDirectory", Dict{String, Any}("SharedDirectoryId"=>SharedDirectoryId); aws_config=aws_config)
accept_shared_directory(SharedDirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("AcceptSharedDirectory", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("SharedDirectoryId"=>SharedDirectoryId), params)); aws_config=aws_config)

"""
    add_ip_routes(directory_id, ip_routes)
    add_ip_routes(directory_id, ip_routes, params::Dict{String,<:Any})

If the DNS server for your on-premises domain uses a publicly addressable IP address, you
must add a CIDR address block to correctly route traffic to and from your Microsoft AD on
Amazon Web Services. AddIpRoutes adds this address block. You can also use AddIpRoutes to
facilitate routing traffic that uses public IP ranges from your Microsoft AD on AWS to a
peer VPC.  Before you call AddIpRoutes, ensure that all of the required permissions have
been explicitly granted through a policy. For details about what permissions are required
to run the AddIpRoutes operation, see AWS Directory Service API Permissions: Actions,
Resources, and Conditions Reference.

# Arguments
- `directory_id`: Identifier (ID) of the directory to which to add the address block.
- `ip_routes`: IP address blocks, using CIDR format, of the traffic to route. This is often
  the IP address block of the DNS server used for your on-premises domain.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"UpdateSecurityGroupForDirectoryControllers"`: If set to true, updates the inbound and
  outbound rules of the security group that has the description: \"AWS created security group
  for directory ID directory controllers.\" Following are the new rules:  Inbound:   Type:
  Custom UDP Rule, Protocol: UDP, Range: 88, Source: 0.0.0.0/0   Type: Custom UDP Rule,
  Protocol: UDP, Range: 123, Source: 0.0.0.0/0   Type: Custom UDP Rule, Protocol: UDP, Range:
  138, Source: 0.0.0.0/0   Type: Custom UDP Rule, Protocol: UDP, Range: 389, Source:
  0.0.0.0/0   Type: Custom UDP Rule, Protocol: UDP, Range: 464, Source: 0.0.0.0/0   Type:
  Custom UDP Rule, Protocol: UDP, Range: 445, Source: 0.0.0.0/0   Type: Custom TCP Rule,
  Protocol: TCP, Range: 88, Source: 0.0.0.0/0   Type: Custom TCP Rule, Protocol: TCP, Range:
  135, Source: 0.0.0.0/0   Type: Custom TCP Rule, Protocol: TCP, Range: 445, Source:
  0.0.0.0/0   Type: Custom TCP Rule, Protocol: TCP, Range: 464, Source: 0.0.0.0/0   Type:
  Custom TCP Rule, Protocol: TCP, Range: 636, Source: 0.0.0.0/0   Type: Custom TCP Rule,
  Protocol: TCP, Range: 1024-65535, Source: 0.0.0.0/0   Type: Custom TCP Rule, Protocol: TCP,
  Range: 3268-33269, Source: 0.0.0.0/0   Type: DNS (UDP), Protocol: UDP, Range: 53, Source:
  0.0.0.0/0   Type: DNS (TCP), Protocol: TCP, Range: 53, Source: 0.0.0.0/0   Type: LDAP,
  Protocol: TCP, Range: 389, Source: 0.0.0.0/0   Type: All ICMP, Protocol: All, Range: N/A,
  Source: 0.0.0.0/0    Outbound:   Type: All traffic, Protocol: All, Range: All, Destination:
  0.0.0.0/0   These security rules impact an internal network interface that is not exposed
  publicly.
"""
add_ip_routes(DirectoryId, IpRoutes; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("AddIpRoutes", Dict{String, Any}("DirectoryId"=>DirectoryId, "IpRoutes"=>IpRoutes); aws_config=aws_config)
add_ip_routes(DirectoryId, IpRoutes, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("AddIpRoutes", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "IpRoutes"=>IpRoutes), params)); aws_config=aws_config)

"""
    add_region(directory_id, region_name, vpcsettings)
    add_region(directory_id, region_name, vpcsettings, params::Dict{String,<:Any})

Adds two domain controllers in the specified Region for the specified directory.

# Arguments
- `directory_id`: The identifier of the directory to which you want to add Region
  replication.
- `region_name`: The name of the Region where you want to add domain controllers for
  replication. For example, us-east-1.
- `vpcsettings`:

"""
add_region(DirectoryId, RegionName, VPCSettings; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("AddRegion", Dict{String, Any}("DirectoryId"=>DirectoryId, "RegionName"=>RegionName, "VPCSettings"=>VPCSettings); aws_config=aws_config)
add_region(DirectoryId, RegionName, VPCSettings, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("AddRegion", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "RegionName"=>RegionName, "VPCSettings"=>VPCSettings), params)); aws_config=aws_config)

"""
    add_tags_to_resource(resource_id, tags)
    add_tags_to_resource(resource_id, tags, params::Dict{String,<:Any})

Adds or overwrites one or more tags for the specified directory. Each directory can have a
maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique
to each resource.

# Arguments
- `resource_id`: Identifier (ID) for the directory to which to add the tag.
- `tags`: The tags to be assigned to the directory.

"""
add_tags_to_resource(ResourceId, Tags; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("AddTagsToResource", Dict{String, Any}("ResourceId"=>ResourceId, "Tags"=>Tags); aws_config=aws_config)
add_tags_to_resource(ResourceId, Tags, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("AddTagsToResource", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ResourceId"=>ResourceId, "Tags"=>Tags), params)); aws_config=aws_config)

"""
    cancel_schema_extension(directory_id, schema_extension_id)
    cancel_schema_extension(directory_id, schema_extension_id, params::Dict{String,<:Any})

Cancels an in-progress schema extension to a Microsoft AD directory. Once a schema
extension has started replicating to all domain controllers, the task can no longer be
canceled. A schema extension can be canceled during any of the following states;
Initializing, CreatingSnapshot, and UpdatingSchema.

# Arguments
- `directory_id`: The identifier of the directory whose schema extension will be canceled.
- `schema_extension_id`: The identifier of the schema extension that will be canceled.

"""
cancel_schema_extension(DirectoryId, SchemaExtensionId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("CancelSchemaExtension", Dict{String, Any}("DirectoryId"=>DirectoryId, "SchemaExtensionId"=>SchemaExtensionId); aws_config=aws_config)
cancel_schema_extension(DirectoryId, SchemaExtensionId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("CancelSchemaExtension", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "SchemaExtensionId"=>SchemaExtensionId), params)); aws_config=aws_config)

"""
    connect_directory(connect_settings, name, password, size)
    connect_directory(connect_settings, name, password, size, params::Dict{String,<:Any})

Creates an AD Connector to connect to an on-premises directory. Before you call
ConnectDirectory, ensure that all of the required permissions have been explicitly granted
through a policy. For details about what permissions are required to run the
ConnectDirectory operation, see AWS Directory Service API Permissions: Actions, Resources,
and Conditions Reference.

# Arguments
- `connect_settings`: A DirectoryConnectSettings object that contains additional
  information for the operation.
- `name`: The fully qualified name of the on-premises directory, such as corp.example.com.
- `password`: The password for the on-premises user account.
- `size`: The size of the directory.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"Description"`: A description for the directory.
- `"ShortName"`: The NetBIOS name of the on-premises directory, such as CORP.
- `"Tags"`: The tags to be assigned to AD Connector.
"""
connect_directory(ConnectSettings, Name, Password, Size; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("ConnectDirectory", Dict{String, Any}("ConnectSettings"=>ConnectSettings, "Name"=>Name, "Password"=>Password, "Size"=>Size); aws_config=aws_config)
connect_directory(ConnectSettings, Name, Password, Size, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("ConnectDirectory", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ConnectSettings"=>ConnectSettings, "Name"=>Name, "Password"=>Password, "Size"=>Size), params)); aws_config=aws_config)

"""
    create_alias(alias, directory_id)
    create_alias(alias, directory_id, params::Dict{String,<:Any})

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.

# Arguments
- `alias`: The requested alias. The alias must be unique amongst all aliases in AWS. This
  operation throws an EntityAlreadyExistsException error if the alias already exists.
- `directory_id`: The identifier of the directory for which to create the alias.

"""
create_alias(Alias, DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("CreateAlias", Dict{String, Any}("Alias"=>Alias, "DirectoryId"=>DirectoryId); aws_config=aws_config)
create_alias(Alias, DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("CreateAlias", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("Alias"=>Alias, "DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    create_computer(computer_name, directory_id, password)
    create_computer(computer_name, directory_id, password, params::Dict{String,<:Any})

Creates an Active Directory computer object in the specified directory.

# Arguments
- `computer_name`: The name of the computer account.
- `directory_id`: The identifier of the directory in which to create the computer account.
- `password`: 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.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"ComputerAttributes"`: An array of Attribute objects that contain any LDAP attributes to
  apply to the computer account.
- `"OrganizationalUnitDistinguishedName"`: The fully-qualified distinguished name of the
  organizational unit to place the computer account in.
"""
create_computer(ComputerName, DirectoryId, Password; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("CreateComputer", Dict{String, Any}("ComputerName"=>ComputerName, "DirectoryId"=>DirectoryId, "Password"=>Password); aws_config=aws_config)
create_computer(ComputerName, DirectoryId, Password, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("CreateComputer", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ComputerName"=>ComputerName, "DirectoryId"=>DirectoryId, "Password"=>Password), params)); aws_config=aws_config)

"""
    create_conditional_forwarder(directory_id, dns_ip_addrs, remote_domain_name)
    create_conditional_forwarder(directory_id, dns_ip_addrs, remote_domain_name, params::Dict{String,<:Any})

Creates a conditional forwarder associated with your AWS directory. Conditional forwarders
are required in order to set up a trust relationship with another domain. The conditional
forwarder points to the trusted domain.

# Arguments
- `directory_id`: The directory ID of the AWS directory for which you are creating the
  conditional forwarder.
- `dns_ip_addrs`: The IP addresses of the remote DNS server associated with
  RemoteDomainName.
- `remote_domain_name`: The fully qualified domain name (FQDN) of the remote domain with
  which you will set up a trust relationship.

"""
create_conditional_forwarder(DirectoryId, DnsIpAddrs, RemoteDomainName; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("CreateConditionalForwarder", Dict{String, Any}("DirectoryId"=>DirectoryId, "DnsIpAddrs"=>DnsIpAddrs, "RemoteDomainName"=>RemoteDomainName); aws_config=aws_config)
create_conditional_forwarder(DirectoryId, DnsIpAddrs, RemoteDomainName, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("CreateConditionalForwarder", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "DnsIpAddrs"=>DnsIpAddrs, "RemoteDomainName"=>RemoteDomainName), params)); aws_config=aws_config)

"""
    create_directory(name, password, size)
    create_directory(name, password, size, params::Dict{String,<:Any})

Creates a Simple AD directory. For more information, see Simple Active Directory in the AWS
Directory Service Admin Guide. Before you call CreateDirectory, ensure that all of the
required permissions have been explicitly granted through a policy. For details about what
permissions are required to run the CreateDirectory operation, see AWS Directory Service
API Permissions: Actions, Resources, and Conditions Reference.

# Arguments
- `name`: The fully qualified name for the directory, such as corp.example.com.
- `password`: The password for the directory administrator. The directory creation process
  creates a directory administrator account with the user name Administrator and this
  password. If you need to change the password for the administrator account, you can use the
  ResetUserPassword API call. The regex pattern for this string is made up of the following
  conditions:   Length (?=^.{8,64}) – Must be between 8 and 64 characters   AND any 3 of
  the following password complexity rules required by Active Directory:   Numbers and upper
  case and lowercase (?=.*d)(?=.*[A-Z])(?=.*[a-z])   Numbers and special characters and lower
  case (?=.*d)(?=.*[^A-Za-z0-9s])(?=.*[a-z])   Special characters and upper case and lower
  case (?=.*[^A-Za-z0-9s])(?=.*[A-Z])(?=.*[a-z])   Numbers and upper case and special
  characters (?=.*d)(?=.*[A-Z])(?=.*[^A-Za-z0-9s])   For additional information about how
  Active Directory passwords are enforced, see Password must meet complexity requirements on
  the Microsoft website.
- `size`: The size of the directory.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"Description"`: A description for the directory.
- `"ShortName"`: The NetBIOS name of the directory, such as CORP.
- `"Tags"`: The tags to be assigned to the Simple AD directory.
- `"VpcSettings"`: A DirectoryVpcSettings object that contains additional information for
  the operation.
"""
create_directory(Name, Password, Size; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("CreateDirectory", Dict{String, Any}("Name"=>Name, "Password"=>Password, "Size"=>Size); aws_config=aws_config)
create_directory(Name, Password, Size, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("CreateDirectory", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("Name"=>Name, "Password"=>Password, "Size"=>Size), params)); aws_config=aws_config)

"""
    create_log_subscription(directory_id, log_group_name)
    create_log_subscription(directory_id, log_group_name, params::Dict{String,<:Any})

Creates a subscription to forward real-time Directory Service domain controller security
logs to the specified Amazon CloudWatch log group in your AWS account.

# Arguments
- `directory_id`: Identifier of the directory to which you want to subscribe and receive
  real-time logs to your specified CloudWatch log group.
- `log_group_name`: The name of the CloudWatch log group where the real-time domain
  controller logs are forwarded.

"""
create_log_subscription(DirectoryId, LogGroupName; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("CreateLogSubscription", Dict{String, Any}("DirectoryId"=>DirectoryId, "LogGroupName"=>LogGroupName); aws_config=aws_config)
create_log_subscription(DirectoryId, LogGroupName, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("CreateLogSubscription", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "LogGroupName"=>LogGroupName), params)); aws_config=aws_config)

"""
    create_microsoft_ad(name, password, vpc_settings)
    create_microsoft_ad(name, password, vpc_settings, params::Dict{String,<:Any})

Creates a Microsoft AD directory in the AWS Cloud. For more information, see AWS Managed
Microsoft AD in the AWS Directory Service Admin Guide. Before you call CreateMicrosoftAD,
ensure that all of the required permissions have been explicitly granted through a policy.
For details about what permissions are required to run the CreateMicrosoftAD operation, see
AWS Directory Service API Permissions: Actions, Resources, and Conditions Reference.

# Arguments
- `name`: The fully qualified domain name for the AWS Managed Microsoft AD directory, such
  as corp.example.com. This name will resolve inside your VPC only. It does not need to be
  publicly resolvable.
- `password`: The password for the default administrative user named Admin. If you need to
  change the password for the administrator account, you can use the ResetUserPassword API
  call.
- `vpc_settings`: Contains VPC information for the CreateDirectory or CreateMicrosoftAD
  operation.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"Description"`: A description for the directory. This label will appear on the AWS
  console Directory Details page after the directory is created.
- `"Edition"`: AWS Managed Microsoft AD is available in two editions: Standard and
  Enterprise. Enterprise is the default.
- `"ShortName"`: The NetBIOS name for your domain, such as CORP. If you don't specify a
  NetBIOS name, it will default to the first part of your directory DNS. For example, CORP
  for the directory DNS corp.example.com.
- `"Tags"`: The tags to be assigned to the AWS Managed Microsoft AD directory.
"""
create_microsoft_ad(Name, Password, VpcSettings; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("CreateMicrosoftAD", Dict{String, Any}("Name"=>Name, "Password"=>Password, "VpcSettings"=>VpcSettings); aws_config=aws_config)
create_microsoft_ad(Name, Password, VpcSettings, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("CreateMicrosoftAD", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("Name"=>Name, "Password"=>Password, "VpcSettings"=>VpcSettings), params)); aws_config=aws_config)

"""
    create_snapshot(directory_id)
    create_snapshot(directory_id, params::Dict{String,<:Any})

Creates a snapshot of a Simple AD or Microsoft AD directory in the AWS cloud.  You cannot
take snapshots of AD Connector directories.

# Arguments
- `directory_id`: The identifier of the directory of which to take a snapshot.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"Name"`: The descriptive name to apply to the snapshot.
"""
create_snapshot(DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("CreateSnapshot", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
create_snapshot(DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("CreateSnapshot", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    create_trust(directory_id, remote_domain_name, trust_direction, trust_password)
    create_trust(directory_id, remote_domain_name, trust_direction, trust_password, params::Dict{String,<:Any})

AWS Directory Service for Microsoft Active Directory allows you to configure trust
relationships. For example, you can establish a trust between your AWS Managed Microsoft AD
directory, and your existing on-premises Microsoft Active Directory. This would allow you
to provide users and groups access to resources in either domain, with a single set of
credentials. This action initiates the creation of the AWS side of a trust relationship
between an AWS Managed Microsoft AD directory and an external domain. You can create either
a forest trust or an external trust.

# Arguments
- `directory_id`: The Directory ID of the AWS Managed Microsoft AD directory for which to
  establish the trust relationship.
- `remote_domain_name`: The Fully Qualified Domain Name (FQDN) of the external domain for
  which to create the trust relationship.
- `trust_direction`: The direction of the trust relationship.
- `trust_password`: The trust password. The must be the same password that was used when
  creating the trust relationship on the external domain.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"ConditionalForwarderIpAddrs"`: The IP addresses of the remote DNS server associated
  with RemoteDomainName.
- `"SelectiveAuth"`: Optional parameter to enable selective authentication for the trust.
- `"TrustType"`: The trust relationship type. Forest is the default.
"""
create_trust(DirectoryId, RemoteDomainName, TrustDirection, TrustPassword; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("CreateTrust", Dict{String, Any}("DirectoryId"=>DirectoryId, "RemoteDomainName"=>RemoteDomainName, "TrustDirection"=>TrustDirection, "TrustPassword"=>TrustPassword); aws_config=aws_config)
create_trust(DirectoryId, RemoteDomainName, TrustDirection, TrustPassword, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("CreateTrust", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "RemoteDomainName"=>RemoteDomainName, "TrustDirection"=>TrustDirection, "TrustPassword"=>TrustPassword), params)); aws_config=aws_config)

"""
    delete_conditional_forwarder(directory_id, remote_domain_name)
    delete_conditional_forwarder(directory_id, remote_domain_name, params::Dict{String,<:Any})

Deletes a conditional forwarder that has been set up for your AWS directory.

# Arguments
- `directory_id`: The directory ID for which you are deleting the conditional forwarder.
- `remote_domain_name`: The fully qualified domain name (FQDN) of the remote domain with
  which you are deleting the conditional forwarder.

"""
delete_conditional_forwarder(DirectoryId, RemoteDomainName; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DeleteConditionalForwarder", Dict{String, Any}("DirectoryId"=>DirectoryId, "RemoteDomainName"=>RemoteDomainName); aws_config=aws_config)
delete_conditional_forwarder(DirectoryId, RemoteDomainName, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DeleteConditionalForwarder", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "RemoteDomainName"=>RemoteDomainName), params)); aws_config=aws_config)

"""
    delete_directory(directory_id)
    delete_directory(directory_id, params::Dict{String,<:Any})

Deletes an AWS Directory Service directory. Before you call DeleteDirectory, ensure that
all of the required permissions have been explicitly granted through a policy. For details
about what permissions are required to run the DeleteDirectory operation, see AWS Directory
Service API Permissions: Actions, Resources, and Conditions Reference.

# Arguments
- `directory_id`: The identifier of the directory to delete.

"""
delete_directory(DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DeleteDirectory", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
delete_directory(DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DeleteDirectory", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    delete_log_subscription(directory_id)
    delete_log_subscription(directory_id, params::Dict{String,<:Any})

Deletes the specified log subscription.

# Arguments
- `directory_id`: Identifier of the directory whose log subscription you want to delete.

"""
delete_log_subscription(DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DeleteLogSubscription", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
delete_log_subscription(DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DeleteLogSubscription", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    delete_snapshot(snapshot_id)
    delete_snapshot(snapshot_id, params::Dict{String,<:Any})

Deletes a directory snapshot.

# Arguments
- `snapshot_id`: The identifier of the directory snapshot to be deleted.

"""
delete_snapshot(SnapshotId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DeleteSnapshot", Dict{String, Any}("SnapshotId"=>SnapshotId); aws_config=aws_config)
delete_snapshot(SnapshotId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DeleteSnapshot", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("SnapshotId"=>SnapshotId), params)); aws_config=aws_config)

"""
    delete_trust(trust_id)
    delete_trust(trust_id, params::Dict{String,<:Any})

Deletes an existing trust relationship between your AWS Managed Microsoft AD directory and
an external domain.

# Arguments
- `trust_id`: The Trust ID of the trust relationship to be deleted.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"DeleteAssociatedConditionalForwarder"`: Delete a conditional forwarder as part of a
  DeleteTrustRequest.
"""
delete_trust(TrustId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DeleteTrust", Dict{String, Any}("TrustId"=>TrustId); aws_config=aws_config)
delete_trust(TrustId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DeleteTrust", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("TrustId"=>TrustId), params)); aws_config=aws_config)

"""
    deregister_certificate(certificate_id, directory_id)
    deregister_certificate(certificate_id, directory_id, params::Dict{String,<:Any})

Deletes from the system the certificate that was registered for secure LDAP or client
certificate authentication.

# Arguments
- `certificate_id`: The identifier of the certificate.
- `directory_id`: The identifier of the directory.

"""
deregister_certificate(CertificateId, DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DeregisterCertificate", Dict{String, Any}("CertificateId"=>CertificateId, "DirectoryId"=>DirectoryId); aws_config=aws_config)
deregister_certificate(CertificateId, DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DeregisterCertificate", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("CertificateId"=>CertificateId, "DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    deregister_event_topic(directory_id, topic_name)
    deregister_event_topic(directory_id, topic_name, params::Dict{String,<:Any})

Removes the specified directory as a publisher to the specified SNS topic.

# Arguments
- `directory_id`: The Directory ID to remove as a publisher. This directory will no longer
  send messages to the specified SNS topic.
- `topic_name`: The name of the SNS topic from which to remove the directory as a publisher.

"""
deregister_event_topic(DirectoryId, TopicName; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DeregisterEventTopic", Dict{String, Any}("DirectoryId"=>DirectoryId, "TopicName"=>TopicName); aws_config=aws_config)
deregister_event_topic(DirectoryId, TopicName, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DeregisterEventTopic", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "TopicName"=>TopicName), params)); aws_config=aws_config)

"""
    describe_certificate(certificate_id, directory_id)
    describe_certificate(certificate_id, directory_id, params::Dict{String,<:Any})

Displays information about the certificate registered for secure LDAP or client certificate
authentication.

# Arguments
- `certificate_id`: The identifier of the certificate.
- `directory_id`: The identifier of the directory.

"""
describe_certificate(CertificateId, DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeCertificate", Dict{String, Any}("CertificateId"=>CertificateId, "DirectoryId"=>DirectoryId); aws_config=aws_config)
describe_certificate(CertificateId, DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeCertificate", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("CertificateId"=>CertificateId, "DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    describe_conditional_forwarders(directory_id)
    describe_conditional_forwarders(directory_id, params::Dict{String,<:Any})

Obtains information about the conditional forwarders for this account. If no input
parameters are provided for RemoteDomainNames, this request describes all conditional
forwarders for the specified directory ID.

# Arguments
- `directory_id`: The directory ID for which to get the list of associated conditional
  forwarders.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"RemoteDomainNames"`: The fully qualified domain names (FQDN) of the remote domains for
  which to get the list of associated conditional forwarders. If this member is null, all
  conditional forwarders are returned.
"""
describe_conditional_forwarders(DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeConditionalForwarders", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
describe_conditional_forwarders(DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeConditionalForwarders", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    describe_directories()
    describe_directories(params::Dict{String,<:Any})

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.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"DirectoryIds"`: A list of identifiers of the directories for which to obtain the
  information. If this member is null, all directories that belong to the current account are
  returned. An empty list results in an InvalidParameterException being thrown.
- `"Limit"`: 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.
- `"NextToken"`: The DescribeDirectoriesResult.NextToken value from a previous call to
  DescribeDirectories. Pass null if this is the first call.
"""
describe_directories(; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeDirectories"; aws_config=aws_config)
describe_directories(params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeDirectories", params; aws_config=aws_config)

"""
    describe_domain_controllers(directory_id)
    describe_domain_controllers(directory_id, params::Dict{String,<:Any})

Provides information about any domain controllers in your directory.

# Arguments
- `directory_id`: Identifier of the directory for which to retrieve the domain controller
  information.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"DomainControllerIds"`: A list of identifiers for the domain controllers whose
  information will be provided.
- `"Limit"`: The maximum number of items to return.
- `"NextToken"`: The DescribeDomainControllers.NextToken value from a previous call to
  DescribeDomainControllers. Pass null if this is the first call.
"""
describe_domain_controllers(DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeDomainControllers", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
describe_domain_controllers(DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeDomainControllers", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    describe_event_topics()
    describe_event_topics(params::Dict{String,<:Any})

Obtains information about which SNS topics receive status messages from the specified
directory. If no input parameters are provided, such as DirectoryId or TopicName, this
request describes all of the associations in the account.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"DirectoryId"`: The Directory ID for which to get the list of associated SNS topics. If
  this member is null, associations for all Directory IDs are returned.
- `"TopicNames"`: A list of SNS topic names for which to obtain the information. If this
  member is null, all associations for the specified Directory ID are returned. An empty list
  results in an InvalidParameterException being thrown.
"""
describe_event_topics(; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeEventTopics"; aws_config=aws_config)
describe_event_topics(params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeEventTopics", params; aws_config=aws_config)

"""
    describe_ldapssettings(directory_id)
    describe_ldapssettings(directory_id, params::Dict{String,<:Any})

Describes the status of LDAP security for the specified directory.

# Arguments
- `directory_id`: The identifier of the directory.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"Limit"`: Specifies the number of items that should be displayed on one page.
- `"NextToken"`: The type of next token used for pagination.
- `"Type"`: The type of LDAP security to enable. Currently only the value Client is
  supported.
"""
describe_ldapssettings(DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeLDAPSSettings", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
describe_ldapssettings(DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeLDAPSSettings", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    describe_regions(directory_id)
    describe_regions(directory_id, params::Dict{String,<:Any})

Provides information about the Regions that are configured for multi-Region replication.

# Arguments
- `directory_id`: The identifier of the directory.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"NextToken"`: The DescribeRegionsResult.NextToken value from a previous call to
  DescribeRegions. Pass null if this is the first call.
- `"RegionName"`: The name of the Region. For example, us-east-1.
"""
describe_regions(DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeRegions", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
describe_regions(DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeRegions", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    describe_shared_directories(owner_directory_id)
    describe_shared_directories(owner_directory_id, params::Dict{String,<:Any})

Returns the shared directories in your account.

# Arguments
- `owner_directory_id`: Returns the identifier of the directory in the directory owner
  account.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"Limit"`: The number of shared directories to return in the response object.
- `"NextToken"`: The DescribeSharedDirectoriesResult.NextToken value from a previous call
  to DescribeSharedDirectories. Pass null if this is the first call.
- `"SharedDirectoryIds"`: A list of identifiers of all shared directories in your account.
"""
describe_shared_directories(OwnerDirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeSharedDirectories", Dict{String, Any}("OwnerDirectoryId"=>OwnerDirectoryId); aws_config=aws_config)
describe_shared_directories(OwnerDirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeSharedDirectories", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("OwnerDirectoryId"=>OwnerDirectoryId), params)); aws_config=aws_config)

"""
    describe_snapshots()
    describe_snapshots(params::Dict{String,<:Any})

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.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"DirectoryId"`: The identifier of the directory for which to retrieve snapshot
  information.
- `"Limit"`: The maximum number of objects to return.
- `"NextToken"`: The DescribeSnapshotsResult.NextToken value from a previous call to
  DescribeSnapshots. Pass null if this is the first call.
- `"SnapshotIds"`: 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.
"""
describe_snapshots(; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeSnapshots"; aws_config=aws_config)
describe_snapshots(params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeSnapshots", params; aws_config=aws_config)

"""
    describe_trusts()
    describe_trusts(params::Dict{String,<:Any})

Obtains information about the trust relationships for this account. If no input parameters
are provided, such as DirectoryId or TrustIds, this request describes all the trust
relationships belonging to the account.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"DirectoryId"`: The Directory ID of the AWS directory that is a part of the requested
  trust relationship.
- `"Limit"`: The maximum number of objects to return.
- `"NextToken"`: The DescribeTrustsResult.NextToken value from a previous call to
  DescribeTrusts. Pass null if this is the first call.
- `"TrustIds"`: A list of identifiers of the trust relationships for which to obtain the
  information. If this member is null, all trust relationships that belong to the current
  account are returned. An empty list results in an InvalidParameterException being thrown.
"""
describe_trusts(; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeTrusts"; aws_config=aws_config)
describe_trusts(params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DescribeTrusts", params; aws_config=aws_config)

"""
    disable_client_authentication(directory_id, type)
    disable_client_authentication(directory_id, type, params::Dict{String,<:Any})

Disables alternative client authentication methods for the specified directory.

# Arguments
- `directory_id`: The identifier of the directory
- `type`: The type of client authentication to disable. Currently, only the parameter,
  SmartCard is supported.

"""
disable_client_authentication(DirectoryId, Type; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DisableClientAuthentication", Dict{String, Any}("DirectoryId"=>DirectoryId, "Type"=>Type); aws_config=aws_config)
disable_client_authentication(DirectoryId, Type, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DisableClientAuthentication", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "Type"=>Type), params)); aws_config=aws_config)

"""
    disable_ldaps(directory_id, type)
    disable_ldaps(directory_id, type, params::Dict{String,<:Any})

Deactivates LDAP secure calls for the specified directory.

# Arguments
- `directory_id`: The identifier of the directory.
- `type`: The type of LDAP security to enable. Currently only the value Client is supported.

"""
disable_ldaps(DirectoryId, Type; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DisableLDAPS", Dict{String, Any}("DirectoryId"=>DirectoryId, "Type"=>Type); aws_config=aws_config)
disable_ldaps(DirectoryId, Type, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DisableLDAPS", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "Type"=>Type), params)); aws_config=aws_config)

"""
    disable_radius(directory_id)
    disable_radius(directory_id, params::Dict{String,<:Any})

Disables multi-factor authentication (MFA) with the Remote Authentication Dial In User
Service (RADIUS) server for an AD Connector or Microsoft AD directory.

# Arguments
- `directory_id`: The identifier of the directory for which to disable MFA.

"""
disable_radius(DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DisableRadius", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
disable_radius(DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DisableRadius", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    disable_sso(directory_id)
    disable_sso(directory_id, params::Dict{String,<:Any})

Disables single-sign on for a directory.

# Arguments
- `directory_id`: The identifier of the directory for which to disable single-sign on.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"Password"`: The password of an alternate account to use to disable single-sign on. This
  is only used for AD Connector directories. For more information, see the UserName parameter.
- `"UserName"`: 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 principal name. If the AD Connector service account does not have privileges to
  remove a service principal 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.
"""
disable_sso(DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DisableSso", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
disable_sso(DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("DisableSso", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    enable_client_authentication(directory_id, type)
    enable_client_authentication(directory_id, type, params::Dict{String,<:Any})

Enables alternative client authentication methods for the specified directory.

# Arguments
- `directory_id`: The identifier of the specified directory.
- `type`: The type of client authentication to enable. Currently only the value SmartCard
  is supported. Smart card authentication in AD Connector requires that you enable Kerberos
  Constrained Delegation for the Service User to the LDAP service in the on-premises AD.

"""
enable_client_authentication(DirectoryId, Type; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("EnableClientAuthentication", Dict{String, Any}("DirectoryId"=>DirectoryId, "Type"=>Type); aws_config=aws_config)
enable_client_authentication(DirectoryId, Type, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("EnableClientAuthentication", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "Type"=>Type), params)); aws_config=aws_config)

"""
    enable_ldaps(directory_id, type)
    enable_ldaps(directory_id, type, params::Dict{String,<:Any})

Activates the switch for the specific directory to always use LDAP secure calls.

# Arguments
- `directory_id`: The identifier of the directory.
- `type`: The type of LDAP security to enable. Currently only the value Client is supported.

"""
enable_ldaps(DirectoryId, Type; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("EnableLDAPS", Dict{String, Any}("DirectoryId"=>DirectoryId, "Type"=>Type); aws_config=aws_config)
enable_ldaps(DirectoryId, Type, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("EnableLDAPS", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "Type"=>Type), params)); aws_config=aws_config)

"""
    enable_radius(directory_id, radius_settings)
    enable_radius(directory_id, radius_settings, params::Dict{String,<:Any})

Enables multi-factor authentication (MFA) with the Remote Authentication Dial In User
Service (RADIUS) server for an AD Connector or Microsoft AD directory.

# Arguments
- `directory_id`: The identifier of the directory for which to enable MFA.
- `radius_settings`: A RadiusSettings object that contains information about the RADIUS
  server.

"""
enable_radius(DirectoryId, RadiusSettings; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("EnableRadius", Dict{String, Any}("DirectoryId"=>DirectoryId, "RadiusSettings"=>RadiusSettings); aws_config=aws_config)
enable_radius(DirectoryId, RadiusSettings, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("EnableRadius", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "RadiusSettings"=>RadiusSettings), params)); aws_config=aws_config)

"""
    enable_sso(directory_id)
    enable_sso(directory_id, params::Dict{String,<:Any})

Enables single sign-on for a directory. Single sign-on allows users in your directory to
access certain AWS services from a computer joined to the directory without having to enter
their credentials separately.

# Arguments
- `directory_id`: The identifier of the directory for which to enable single-sign on.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"Password"`: The password of an alternate account to use to enable single-sign on. This
  is only used for AD Connector directories. For more information, see the UserName parameter.
- `"UserName"`: 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 principal name. If the AD Connector service account does not have privileges to add
  a service principal 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.
"""
enable_sso(DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("EnableSso", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
enable_sso(DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("EnableSso", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    get_directory_limits()
    get_directory_limits(params::Dict{String,<:Any})

Obtains directory limit information for the current Region.

"""
get_directory_limits(; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("GetDirectoryLimits"; aws_config=aws_config)
get_directory_limits(params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("GetDirectoryLimits", params; aws_config=aws_config)

"""
    get_snapshot_limits(directory_id)
    get_snapshot_limits(directory_id, params::Dict{String,<:Any})

Obtains the manual snapshot limits for a directory.

# Arguments
- `directory_id`: Contains the identifier of the directory to obtain the limits for.

"""
get_snapshot_limits(DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("GetSnapshotLimits", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
get_snapshot_limits(DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("GetSnapshotLimits", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    list_certificates(directory_id)
    list_certificates(directory_id, params::Dict{String,<:Any})

For the specified directory, lists all the certificates registered for a secure LDAP or
client certificate authentication.

# Arguments
- `directory_id`: The identifier of the directory.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"Limit"`: The number of items that should show up on one page
- `"NextToken"`: A token for requesting another page of certificates if the NextToken
  response element indicates that more certificates are available. Use the value of the
  returned NextToken element in your request until the token comes back as null. Pass null if
  this is the first call.
"""
list_certificates(DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("ListCertificates", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
list_certificates(DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("ListCertificates", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    list_ip_routes(directory_id)
    list_ip_routes(directory_id, params::Dict{String,<:Any})

Lists the address blocks that you have added to a directory.

# Arguments
- `directory_id`: Identifier (ID) of the directory for which you want to retrieve the IP
  addresses.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"Limit"`: Maximum number of items to return. If this value is zero, the maximum number
  of items is specified by the limitations of the operation.
- `"NextToken"`: The ListIpRoutes.NextToken value from a previous call to ListIpRoutes.
  Pass null if this is the first call.
"""
list_ip_routes(DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("ListIpRoutes", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
list_ip_routes(DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("ListIpRoutes", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    list_log_subscriptions()
    list_log_subscriptions(params::Dict{String,<:Any})

Lists the active log subscriptions for the AWS account.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"DirectoryId"`: If a DirectoryID is provided, lists only the log subscription associated
  with that directory. If no DirectoryId is provided, lists all log subscriptions associated
  with your AWS account. If there are no log subscriptions for the AWS account or the
  directory, an empty list will be returned.
- `"Limit"`: The maximum number of items returned.
- `"NextToken"`: The token for the next set of items to return.
"""
list_log_subscriptions(; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("ListLogSubscriptions"; aws_config=aws_config)
list_log_subscriptions(params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("ListLogSubscriptions", params; aws_config=aws_config)

"""
    list_schema_extensions(directory_id)
    list_schema_extensions(directory_id, params::Dict{String,<:Any})

Lists all schema extensions applied to a Microsoft AD Directory.

# Arguments
- `directory_id`: The identifier of the directory from which to retrieve the schema
  extension information.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"Limit"`: The maximum number of items to return.
- `"NextToken"`: The ListSchemaExtensions.NextToken value from a previous call to
  ListSchemaExtensions. Pass null if this is the first call.
"""
list_schema_extensions(DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("ListSchemaExtensions", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
list_schema_extensions(DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("ListSchemaExtensions", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    list_tags_for_resource(resource_id)
    list_tags_for_resource(resource_id, params::Dict{String,<:Any})

Lists all tags on a directory.

# Arguments
- `resource_id`: Identifier (ID) of the directory for which you want to retrieve tags.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"Limit"`: Reserved for future use.
- `"NextToken"`: Reserved for future use.
"""
list_tags_for_resource(ResourceId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("ListTagsForResource", Dict{String, Any}("ResourceId"=>ResourceId); aws_config=aws_config)
list_tags_for_resource(ResourceId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("ListTagsForResource", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ResourceId"=>ResourceId), params)); aws_config=aws_config)

"""
    register_certificate(certificate_data, directory_id)
    register_certificate(certificate_data, directory_id, params::Dict{String,<:Any})

Registers a certificate for a secure LDAP or client certificate authentication.

# Arguments
- `certificate_data`: The certificate PEM string that needs to be registered.
- `directory_id`: The identifier of the directory.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"ClientCertAuthSettings"`: A ClientCertAuthSettings object that contains client
  certificate authentication settings.
- `"Type"`: The function that the registered certificate performs. Valid values include
  ClientLDAPS or ClientCertAuth. The default value is ClientLDAPS.
"""
register_certificate(CertificateData, DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("RegisterCertificate", Dict{String, Any}("CertificateData"=>CertificateData, "DirectoryId"=>DirectoryId); aws_config=aws_config)
register_certificate(CertificateData, DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("RegisterCertificate", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("CertificateData"=>CertificateData, "DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    register_event_topic(directory_id, topic_name)
    register_event_topic(directory_id, topic_name, params::Dict{String,<:Any})

Associates a directory with an SNS topic. This establishes the directory as a publisher to
the specified SNS topic. You can then receive email or text (SMS) messages when the status
of your directory changes. You get notified if your directory goes from an Active status to
an Impaired or Inoperable status. You also receive a notification when the directory
returns to an Active status.

# Arguments
- `directory_id`: The Directory ID that will publish status messages to the SNS topic.
- `topic_name`: The SNS topic name to which the directory will publish status messages.
  This SNS topic must be in the same region as the specified Directory ID.

"""
register_event_topic(DirectoryId, TopicName; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("RegisterEventTopic", Dict{String, Any}("DirectoryId"=>DirectoryId, "TopicName"=>TopicName); aws_config=aws_config)
register_event_topic(DirectoryId, TopicName, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("RegisterEventTopic", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "TopicName"=>TopicName), params)); aws_config=aws_config)

"""
    reject_shared_directory(shared_directory_id)
    reject_shared_directory(shared_directory_id, params::Dict{String,<:Any})

Rejects a directory sharing request that was sent from the directory owner account.

# Arguments
- `shared_directory_id`: Identifier of the shared directory in the directory consumer
  account. This identifier is different for each directory owner account.

"""
reject_shared_directory(SharedDirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("RejectSharedDirectory", Dict{String, Any}("SharedDirectoryId"=>SharedDirectoryId); aws_config=aws_config)
reject_shared_directory(SharedDirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("RejectSharedDirectory", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("SharedDirectoryId"=>SharedDirectoryId), params)); aws_config=aws_config)

"""
    remove_ip_routes(cidr_ips, directory_id)
    remove_ip_routes(cidr_ips, directory_id, params::Dict{String,<:Any})

Removes IP address blocks from a directory.

# Arguments
- `cidr_ips`: IP address blocks that you want to remove.
- `directory_id`: Identifier (ID) of the directory from which you want to remove the IP
  addresses.

"""
remove_ip_routes(CidrIps, DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("RemoveIpRoutes", Dict{String, Any}("CidrIps"=>CidrIps, "DirectoryId"=>DirectoryId); aws_config=aws_config)
remove_ip_routes(CidrIps, DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("RemoveIpRoutes", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("CidrIps"=>CidrIps, "DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    remove_region(directory_id)
    remove_region(directory_id, params::Dict{String,<:Any})

Stops all replication and removes the domain controllers from the specified Region. You
cannot remove the primary Region with this operation. Instead, use the DeleteDirectory API.

# Arguments
- `directory_id`: The identifier of the directory for which you want to remove Region
  replication.

"""
remove_region(DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("RemoveRegion", Dict{String, Any}("DirectoryId"=>DirectoryId); aws_config=aws_config)
remove_region(DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("RemoveRegion", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    remove_tags_from_resource(resource_id, tag_keys)
    remove_tags_from_resource(resource_id, tag_keys, params::Dict{String,<:Any})

Removes tags from a directory.

# Arguments
- `resource_id`: Identifier (ID) of the directory from which to remove the tag.
- `tag_keys`: The tag key (name) of the tag to be removed.

"""
remove_tags_from_resource(ResourceId, TagKeys; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("RemoveTagsFromResource", Dict{String, Any}("ResourceId"=>ResourceId, "TagKeys"=>TagKeys); aws_config=aws_config)
remove_tags_from_resource(ResourceId, TagKeys, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("RemoveTagsFromResource", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ResourceId"=>ResourceId, "TagKeys"=>TagKeys), params)); aws_config=aws_config)

"""
    reset_user_password(directory_id, new_password, user_name)
    reset_user_password(directory_id, new_password, user_name, params::Dict{String,<:Any})

Resets the password for any user in your AWS Managed Microsoft AD or Simple AD directory.
You can reset the password for any user in your directory with the following exceptions:
For Simple AD, you cannot reset the password for any user that is a member of either the
Domain Admins or Enterprise Admins group except for the administrator user.   For AWS
Managed Microsoft AD, you can only reset the password for a user that is in an OU based off
of the NetBIOS name that you typed when you created your directory. For example, you cannot
reset the password for a user in the AWS Reserved OU. For more information about the OU
structure for an AWS Managed Microsoft AD directory, see What Gets Created in the AWS
Directory Service Administration Guide.

# Arguments
- `directory_id`: Identifier of the AWS Managed Microsoft AD or Simple AD directory in
  which the user resides.
- `new_password`: The new password that will be reset.
- `user_name`: The user name of the user whose password will be reset.

"""
reset_user_password(DirectoryId, NewPassword, UserName; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("ResetUserPassword", Dict{String, Any}("DirectoryId"=>DirectoryId, "NewPassword"=>NewPassword, "UserName"=>UserName); aws_config=aws_config)
reset_user_password(DirectoryId, NewPassword, UserName, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("ResetUserPassword", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "NewPassword"=>NewPassword, "UserName"=>UserName), params)); aws_config=aws_config)

"""
    restore_from_snapshot(snapshot_id)
    restore_from_snapshot(snapshot_id, params::Dict{String,<:Any})

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.

# Arguments
- `snapshot_id`: The identifier of the snapshot to restore from.

"""
restore_from_snapshot(SnapshotId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("RestoreFromSnapshot", Dict{String, Any}("SnapshotId"=>SnapshotId); aws_config=aws_config)
restore_from_snapshot(SnapshotId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("RestoreFromSnapshot", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("SnapshotId"=>SnapshotId), params)); aws_config=aws_config)

"""
    share_directory(directory_id, share_method, share_target)
    share_directory(directory_id, share_method, share_target, params::Dict{String,<:Any})

Shares a specified directory (DirectoryId) in your AWS account (directory owner) with
another AWS account (directory consumer). With this operation you can use your directory
from any AWS account and from any Amazon VPC within an AWS Region. When you share your AWS
Managed Microsoft AD directory, AWS Directory Service creates a shared directory in the
directory consumer account. This shared directory contains the metadata to provide access
to the directory within the directory owner account. The shared directory is visible in all
VPCs in the directory consumer account. The ShareMethod parameter determines whether the
specified directory can be shared between AWS accounts inside the same AWS organization
(ORGANIZATIONS). It also determines whether you can share the directory with any other AWS
account either inside or outside of the organization (HANDSHAKE). The ShareNotes parameter
is only used when HANDSHAKE is called, which sends a directory sharing request to the
directory consumer.

# Arguments
- `directory_id`: Identifier of the AWS Managed Microsoft AD directory that you want to
  share with other AWS accounts.
- `share_method`: The method used when sharing a directory to determine whether the
  directory should be shared within your AWS organization (ORGANIZATIONS) or with any AWS
  account by sending a directory sharing request (HANDSHAKE).
- `share_target`: Identifier for the directory consumer account with whom the directory is
  to be shared.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"ShareNotes"`: A directory share request that is sent by the directory owner to the
  directory consumer. The request includes a typed message to help the directory consumer
  administrator determine whether to approve or reject the share invitation.
"""
share_directory(DirectoryId, ShareMethod, ShareTarget; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("ShareDirectory", Dict{String, Any}("DirectoryId"=>DirectoryId, "ShareMethod"=>ShareMethod, "ShareTarget"=>ShareTarget); aws_config=aws_config)
share_directory(DirectoryId, ShareMethod, ShareTarget, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("ShareDirectory", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "ShareMethod"=>ShareMethod, "ShareTarget"=>ShareTarget), params)); aws_config=aws_config)

"""
    start_schema_extension(create_snapshot_before_schema_extension, description, directory_id, ldif_content)
    start_schema_extension(create_snapshot_before_schema_extension, description, directory_id, ldif_content, params::Dict{String,<:Any})

Applies a schema extension to a Microsoft AD directory.

# Arguments
- `create_snapshot_before_schema_extension`: If true, creates a snapshot of the directory
  before applying the schema extension.
- `description`: A description of the schema extension.
- `directory_id`: The identifier of the directory for which the schema extension will be
  applied to.
- `ldif_content`: The LDIF file represented as a string. To construct the LdifContent
  string, precede each line as it would be formatted in an ldif file with n. See the example
  request below for more details. The file size can be no larger than 1MB.

"""
start_schema_extension(CreateSnapshotBeforeSchemaExtension, Description, DirectoryId, LdifContent; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("StartSchemaExtension", Dict{String, Any}("CreateSnapshotBeforeSchemaExtension"=>CreateSnapshotBeforeSchemaExtension, "Description"=>Description, "DirectoryId"=>DirectoryId, "LdifContent"=>LdifContent); aws_config=aws_config)
start_schema_extension(CreateSnapshotBeforeSchemaExtension, Description, DirectoryId, LdifContent, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("StartSchemaExtension", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("CreateSnapshotBeforeSchemaExtension"=>CreateSnapshotBeforeSchemaExtension, "Description"=>Description, "DirectoryId"=>DirectoryId, "LdifContent"=>LdifContent), params)); aws_config=aws_config)

"""
    unshare_directory(directory_id, unshare_target)
    unshare_directory(directory_id, unshare_target, params::Dict{String,<:Any})

Stops the directory sharing between the directory owner and consumer accounts.

# Arguments
- `directory_id`: The identifier of the AWS Managed Microsoft AD directory that you want to
  stop sharing.
- `unshare_target`: Identifier for the directory consumer account with whom the directory
  has to be unshared.

"""
unshare_directory(DirectoryId, UnshareTarget; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("UnshareDirectory", Dict{String, Any}("DirectoryId"=>DirectoryId, "UnshareTarget"=>UnshareTarget); aws_config=aws_config)
unshare_directory(DirectoryId, UnshareTarget, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("UnshareDirectory", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "UnshareTarget"=>UnshareTarget), params)); aws_config=aws_config)

"""
    update_conditional_forwarder(directory_id, dns_ip_addrs, remote_domain_name)
    update_conditional_forwarder(directory_id, dns_ip_addrs, remote_domain_name, params::Dict{String,<:Any})

Updates a conditional forwarder that has been set up for your AWS directory.

# Arguments
- `directory_id`: The directory ID of the AWS directory for which to update the conditional
  forwarder.
- `dns_ip_addrs`: The updated IP addresses of the remote DNS server associated with the
  conditional forwarder.
- `remote_domain_name`: The fully qualified domain name (FQDN) of the remote domain with
  which you will set up a trust relationship.

"""
update_conditional_forwarder(DirectoryId, DnsIpAddrs, RemoteDomainName; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("UpdateConditionalForwarder", Dict{String, Any}("DirectoryId"=>DirectoryId, "DnsIpAddrs"=>DnsIpAddrs, "RemoteDomainName"=>RemoteDomainName); aws_config=aws_config)
update_conditional_forwarder(DirectoryId, DnsIpAddrs, RemoteDomainName, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("UpdateConditionalForwarder", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "DnsIpAddrs"=>DnsIpAddrs, "RemoteDomainName"=>RemoteDomainName), params)); aws_config=aws_config)

"""
    update_number_of_domain_controllers(desired_number, directory_id)
    update_number_of_domain_controllers(desired_number, directory_id, params::Dict{String,<:Any})

Adds or removes domain controllers to or from the directory. Based on the difference
between current value and new value (provided through this API call), domain controllers
will be added or removed. It may take up to 45 minutes for any new domain controllers to
become fully active once the requested number of domain controllers is updated. During this
time, you cannot make another update request.

# Arguments
- `desired_number`: The number of domain controllers desired in the directory.
- `directory_id`: Identifier of the directory to which the domain controllers will be added
  or removed.

"""
update_number_of_domain_controllers(DesiredNumber, DirectoryId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("UpdateNumberOfDomainControllers", Dict{String, Any}("DesiredNumber"=>DesiredNumber, "DirectoryId"=>DirectoryId); aws_config=aws_config)
update_number_of_domain_controllers(DesiredNumber, DirectoryId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("UpdateNumberOfDomainControllers", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DesiredNumber"=>DesiredNumber, "DirectoryId"=>DirectoryId), params)); aws_config=aws_config)

"""
    update_radius(directory_id, radius_settings)
    update_radius(directory_id, radius_settings, params::Dict{String,<:Any})

Updates the Remote Authentication Dial In User Service (RADIUS) server information for an
AD Connector or Microsoft AD directory.

# Arguments
- `directory_id`: The identifier of the directory for which to update the RADIUS server
  information.
- `radius_settings`: A RadiusSettings object that contains information about the RADIUS
  server.

"""
update_radius(DirectoryId, RadiusSettings; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("UpdateRadius", Dict{String, Any}("DirectoryId"=>DirectoryId, "RadiusSettings"=>RadiusSettings); aws_config=aws_config)
update_radius(DirectoryId, RadiusSettings, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("UpdateRadius", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("DirectoryId"=>DirectoryId, "RadiusSettings"=>RadiusSettings), params)); aws_config=aws_config)

"""
    update_trust(trust_id)
    update_trust(trust_id, params::Dict{String,<:Any})

Updates the trust that has been set up between your AWS Managed Microsoft AD directory and
an on-premises Active Directory.

# Arguments
- `trust_id`: Identifier of the trust relationship.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"SelectiveAuth"`: Updates selective authentication for the trust.
"""
update_trust(TrustId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("UpdateTrust", Dict{String, Any}("TrustId"=>TrustId); aws_config=aws_config)
update_trust(TrustId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("UpdateTrust", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("TrustId"=>TrustId), params)); aws_config=aws_config)

"""
    verify_trust(trust_id)
    verify_trust(trust_id, params::Dict{String,<:Any})

AWS Directory Service for Microsoft Active Directory allows you to configure and verify
trust relationships. This action verifies a trust relationship between your AWS Managed
Microsoft AD directory and an external domain.

# Arguments
- `trust_id`: The unique Trust ID of the trust relationship to verify.

"""
verify_trust(TrustId; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("VerifyTrust", Dict{String, Any}("TrustId"=>TrustId); aws_config=aws_config)
verify_trust(TrustId, params::AbstractDict{String, <:Any}; aws_config::AbstractAWSConfig=global_aws_config()) = directory_service("VerifyTrust", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("TrustId"=>TrustId), params)); aws_config=aws_config)


text:
# Code derived from metabolicEP (https://github.com/anna-pa-m/Metabolic-EP)

function compute_mom5d(xinf, xsup)

    minval = min(abs(xinf), abs(xsup))
    sgn = sign(xinf*xsup)

    if xsup - xinf < 1e-8
        return (0.5*(xsup + xinf),-1.)
    end

    if minval <= 6. || sgn <= 0
        ϕsup   = ϕ(xsup)
        Φsup   = Φ(xsup)
        ϕinf   = ϕ(xinf)
        Φinf   = Φ(xinf)
        scra1 = (ϕinf - ϕsup)/(Φsup - Φinf)
        scra2 = (xinf * ϕinf - xsup*ϕsup)/(Φsup -Φinf)
        scra12 = scra2 - scra1^2
        return scra1, scra12
    else
        delta2 = (xsup^2 - xinf^2)*0.5
        if delta2 > 40.
            scra1 = xinf^5/(3 - xinf^2 + xinf^4)
            scra2 = xinf^6/(3 - xinf^2 + xinf^4)
        else
            scra1 = (xinf*xsup)^5 * (1. - exp(delta2)) / (-exp(delta2)*(3.0-xinf^2 + xinf^4)*xsup^5 + xinf^5*(3-xsup^2 + xsup^4))
            scra2 = (xinf*xsup)^5 * (xsup - xinf*exp(delta2)) / (-exp(delta2)*(3.0-xinf^2 + xinf^4)*xsup^5 + xinf^5*(3-xsup^2 + xsup^4))
        end
        scra12 = scra2 - scra1^2
        isnan(scra1) || isnan(scra2) || isnan(scra12) && println("scra1 = $scra1 scra2 = $scra2")
        !isfinite(scra1) ||  !isfinite(scra2) && println("scra1 = $scra1 scra2 = $scra2")
        return scra1, scra12
    end
end

ext: jl


text:
module MacroTest

using Base.Test
using PageDown

pages = ["1", "2", "3", "4", "5"]
page = Page(pages)

@test (page.start:page.step:page.count) == @page
@test ["1"] == @current

for n=1:2page.count
  println("n: $n")
  eval("@step $n")

  @go 1
  @test (1:page.step:page.count) == @page

  @next
  @test (1+page.step:page.step:page.count) == @page

  @prev
  @test (1:page.step:page.count) == @page

  @go 3
  @test (3:page.step:page.count) == @page

  @first
  @test (1:page.step:page.count) == @page

  @last
  @test (5:page.step:page.count) == @page
end

end


text:
## Pattern matching modifications

"""
    Wild(x)

create a "wild card" for pattern matching
"""
Wild(x::AbstractString) = sympy.Wild(x)
Wild(x::Symbol) = Wild(string(x))
export Wild

"""
    match(pattern, expression, ...)

Match a pattern against an expression; returns a dictionary of matches.

If a match is unsuccesful, returns an *empty* dictionary. (SymPy returns "nothing")

The order of the arguments follows `Julia`'s `match` function, not `sympy.match`, which can be used directly, otherwise.
"""
function Base.match(pat::Sym, ex::Sym, args...; kwargs...)
    out = ex.match(pat, args...; kwargs...)
    out == nothing && return Dict()
    out
end

"""
    replace(expression, pattern, value, ...)

From: [SymPy Docs](http://docs.sympy.org/dev/modules/core.html)

Traverses an expression tree and performs replacement of matching
subexpressions from the bottom to the top of the tree. The default
approach is to do the replacement in a simultaneous fashion so changes
made are targeted only once. If this is not desired or causes
problems, `simultaneous` can be set to `false`. In addition, if an
expression containing more than one `Wild` symbol is being used to match
subexpressions and the `exact` flag is `true`, then the match will only
succeed if non-zero values are received for each `Wild` that appears in
the match pattern.

Differences from SymPy:

* "types" are specified via calling `func` on the head of an expression: `func(sin(x))` -> `sin`, or directly through `sympy.sin`

* functions are supported, but only with `PyCall` commands.

Examples (from the SymPy docs)

```jldoctest replace
julia> using SymPy

julia> x, y, z = symbols("x, y, z")
(x, y, z)

julia> f = log(sin(x)) + tan(sin(x^2)); string(f) # `string(f)` only so doctest can run
"log(sin(x)) + tan(sin(x^2))"

```

## "type" -> "type"

Types are specified through `func`:

```jldoctest replace
julia> func = SymPy.Introspection.func
func (generic function with 1 method)

julia> replace(f, func(sin(x)), func(cos(x))) |> string  # type -> type
"log(cos(x)) + tan(cos(x^2))"

julia> replace(f, sympy.sin, sympy.cos)  |>  string
"log(cos(x)) + tan(cos(x^2))"

julia> sin(x).replace(sympy.sin, sympy.cos, map=true)
(cos(x), Dict{Any, Any}(sin(x) => cos(x)))

```

The `func` function finds the head of an expression (`sin` and `cos` above). This could also have been written (perhaps more directly) as:

```jldoctest replace
julia> replace(f, sympy.sin, sympy.cos) |> string
"log(cos(x)) + tan(cos(x^2))"

```

## "type" -> "function"

To replace with a more complicated function, requires some assistance from `Python`, as an anonymous function must be defined witin Python, not `Julia`:

```julia
julia> import PyCall

julia> ## Anonymous function a -> sin(2a)
       PyCall.py\"\"\"
       from sympy import sin, Mul
       def anonfn(*args):
           return sin(2*Mul(*args))
       \"\"\")

julia> replace(f, sympy.sin, PyCall.py"anonfn")
                   ⎛   ⎛   2⎞⎞
log(sin(2⋅x)) + tan⎝sin⎝2⋅x ⎠⎠
```

## "pattern" -> "expression"

Using "`Wild`" variables allows a pattern to be replaced by an expression:

```jldoctest replace
julia> a, b = Wild("a"), Wild("b")
(a_, b_)

julia> replace(f, sin(a), tan(2a)) |> string
"log(tan(2*x)) + tan(tan(2*x^2))"

julia> replace(f, sin(a), tan(a/2)) |> string
"log(tan(x/2)) + tan(tan(x^2/2))"

julia> f.replace(sin(a), a) |> string
"log(x) + tan(x^2)"

julia> (x*y).replace(a*x, a)
y

```

In the SymPy docs we have:

Matching is exact by default when more than one Wild symbol is used: matching fails unless the match gives non-zero values for all Wild symbols."

```jldoctest replace
julia> replace(2x + y, a*x+b, b-a)  # y - 2
y - 2

julia> replace(2x + y, a*x+b, b-a, exact=false)  # y + 2/x
    2
y + ─
    x
```

## "pattern" -> "func"

The function is redefined, as a fixed argument is passed:

```julia
julia> PyCall.py\"\"\"
       from sympy import sin
       def anonfn(a):
           return sin(2*a)
       \"\"\"

julia> replace(f, sin(a), PyCall.py"anonfn")
                   ⎛   ⎛   2⎞⎞
log(sin(2⋅x)) + tan⎝sin⎝2⋅x ⎠⎠
```

## "func" -> "func"

```julia

julia> PyCall.py\"\"\"
       def fn1(expr):
           return expr.is_Number

       def fn2(expr):
           return expr**2
       \"\"\"

julia> replace(2*sin(x^3), PyCall.py"fn1", PyCall.py"fn2")
     ⎛ 9⎞
4⋅sin⎝x ⎠
```

```julia
julia> PyCall.py\"\"\"
       def fn1(x):
           return x.is_Mul

       def fn2(x):
           return 2*x
       \"\"\"

julia> replace(x*(x*y + 1), PyCall.py"fn1", PyCall.py"fn2")
2⋅x⋅(2⋅x⋅y + 1)
```
"""
function Base.replace(ex::Sym, query::Sym, fn::Function; exact=true, kwargs...)
    ## XXX this is failing!
    ex.replace(query, PyCall.PyObject((args...) ->fn(args...)); exact=exact, kwargs...)
end

function Base.replace(ex::Sym, query::Any, value; exact=true, kwargs...)
    ex.replace(query, value; exact=exact, kwargs...)
end

max_stars_repo_name: jverzani/SymPyCall

max_issues_repo_name: jverzani/SymPyCall

max_forks_repo_name: jverzani/SymPyCall


text:
# The targets logic is in some ways a bit more complex than the
# getobs logic. The main reason for this is that we want to
# support a wide variety of data storage types, as well as
# both, interation-based data and index-based data.
#
# A package author has two ways to customize the logic behind
# "targets" for their own data container types:
#
#   1. implementing "gettargets" for the data container type,
#      which bypasses "getobs" entirely.
#
#   2. implementing "gettarget" for the observation type,
#      which is applied on the result of "getobs".
#
# Note that if the optional first parameter is passed to "targets",
# it will always trigger "getobs", since it is assumed that the
# function is applied to the actual observation, and not the storage.
# Furthermore the first parameter is applied to each observation
# individually and not to the data as a whole. In general this means
# that the return type changes drastically.
#
# julia> X = rand(2, 3)
# 2×3 Array{Float64,2}:
#  0.105307   0.58033   0.724643
#  0.0433558  0.116124  0.89431
#
# julia> y = [1 3 5; 2 4 6]
# 2×3 Array{Int64,2}:
#  1  3  5
#  2  4  6
#
# julia> targets((X,y))
# 2×3 Array{Int64,2}:
#  1  3  5
#  2  4  6
#
# julia> targets(x->x, (X,y))
# 3-element Array{Array{Int64,1},1}:
#  [1,2]
#  [3,4]
#  [5,6]
#
# Here are two example scenarios that benefit from custom methods.
# The first one for "gettargets", and the second one for "gettarget".
#
# - Use-Case 1: Directory Based Image Source
#
#   Let's say you write a custom data storage that describes a
#   directory on your hard-drive. Each subdirectory contains a set
#   of large images that belong to a single class (the dir name).
#   This kind of data storage only loads the images itself if
#   they are actually needed (so on "getobs"). The targets however
#   are part of the metadata that is always loaded. So if we are
#   only interested in the targets (for example for resampling),
#   then we would like to avoid calling "getobs" if possible
#   Overloading "LearnBase.gettargets(::MyImageSource, i)" allows
#   a user to do just that. In other words it allows to provide
#   the targets of some observation(s) without ever calling "getobs".
#
# - Use-Case 2: DataFrames
#
#   DataFrames are a kind of data storage, where the targets are
#   as much part of the data as the features are (in contrast to
#   Use-Case 1). Here we are fine with "getobs" being called.
#   However, we still need to say which column actually describes
#   the features. We can do this by passing a function
#   "targets(row->row[1,:Y], dataframe)", or we can provide a
#   convenience syntax by overloading "gettarget".
#   "LearnBase.gettarget(col::Symbol, df::DataFrame) = df[1,col]"
#   This now allows us to call "targets(:Y, dataframe)".
#

# --------------------------------------------------------------------
# gettarget (singular)

"""
    gettarget([f], observation)

Use `f` (if provided) to extract the target from the single
`observation` and return it. It is used internally by
[`targets`](@ref) (only if `f` is provided) and by
[`eachtarget`](@ref) (always) on each individual observation.

```julia
julia> using DataFrames

julia> singleobs = DataFrame(X1=1.0, X2=0.5, Y=:a)
1×3 DataFrames.DataFrame
│ Row │ X1  │ X2  │ Y │
├─────┼─────┼─────┼───┤
│ 1   │ 1.0 │ 0.5 │ a │

julia> LearnBase.gettarget(x->x[1,:Y], singleobs)
:a
```

Even though this function is not exported, it is intended to be
extended by users to support their custom data storage types.
While not always necessary, it can make working with that storage
more convenient. The following example shows how to extend
`gettarget` for a more convenient use with a `DataFrame`. Note
that the first parameter is optional and need not be explicitly
supported.

```julia
julia> LearnBase.gettarget(col::Symbol, obs::DataFrame) = obs[1,col]

julia> LearnBase.gettarget(:Y, singleobs)
:a
```

By defining a custom `gettarget` method other functions (e.g.
[`targets`](@ref), [`eachtarget`](@ref), [`oversample`](@ref),
etc.) can make use of it as well. Note that these functions also
require [`nobs`](@ref) and [`getobs`](@ref) to be defined.

```julia
julia> LearnBase.getobs(data::DataFrame, i) = data[i,:]

julia> LearnBase.nobs(data::DataFrame) = nrow(data)

julia> data = DataFrame(X1=rand(3), X2=rand(3), Y=[:a,:b,:a])
3×3 DataFrames.DataFrame
│ Row │ X1       │ X2       │ Y │
├─────┼──────────┼──────────┼───┤
│ 1   │ 0.31435  │ 0.847857 │ a │
│ 2   │ 0.241307 │ 0.575785 │ b │
│ 3   │ 0.854685 │ 0.926744 │ a │

julia> targets(:Y, data)
3-element Array{Symbol,1}:
 :a
 :b
 :a
```
"""
gettarget

# custom "_" function to not recurse on tuples
# i.e. "_gettarget" interprets tuple while "gettarget" does not
# that means that "_gettarget((x,(y1,y2)))" --> "(y1,y2)", and NOT "y2"
# furthermore "_gettargets" assumes that it is called with a subset
# of one observation and will thus trigger "getobs"
@inline _gettarget(f, data) = gettarget(f, getobs_targetfun(data))

# no nobs check because this should be a single observation
@inline _gettarget(f, tup::NTuple{N,Any}) where {N} = gettarget(f, getobs_targetfun(tup[N]))

# gettarget is intended to be defined by the user
@inline gettarget(data) = data
@inline gettarget(f, data) = f(gettarget(data))

# if a target extraction function is used, then
# we don't need to call "getobs" on a "SubArray".
getobs_targetfun(data) = getobs(data)
getobs_targetfun(tup::Tuple) = map(getobs_targetfun, tup)
getobs_targetfun(A::AbstractArray) = A
getobs_targetfun(A::AbstractArray{T,0}) where {T} = A[1]

# --------------------------------------------------------------------
# gettargets (plural)

"""
    gettargets(data, [idx], [obsdim])

Return the targets corresponding to the observation-indices
`idx`. Note that `idx` can be of type `Int` or `AbstractVector`.

Implementing this function for a custom type of `data` is
optional. It is particularly useful if the targets in `data` can
be provided without invoking `getobs`. For example if you have a
remote data-source where the labels are part of some metadata
that is locally available.

If implemented, calling [`targets`](@ref) will invoke this
method, instead of [`gettarget`](@ref) on the result of
[`getobs`](@ref). This can make operations that require targets,
such as [`oversample`](@ref), much more efficient.

If it makes sense for the type of `data`, `obsdim` can be used to
specify which dimension of `data` denotes the observations. It
can be specified in a type-stable manner as a positional argument
(see `?ObsDim`), or more conveniently as a smart keyword
argument.
"""
gettargets

# custom "_" function to throw away Undefined obsdims.
# this is important so that a user can leave out obsdim when
# implementing a custom method that doesn't need it.
@inline _gettargets(data, ::ObsDim.Undefined) = gettargets(data)
@inline _gettargets(data, idx, ::ObsDim.Undefined) = gettargets(data, idx)
@inline _gettargets(data) = gettargets(data)
@inline _gettargets(data, args...) = gettargets(data, args...)

# gettargets is intended to be defined by the user.
# It's main purpose is to allow types to have the option
# to load the targets of some data without needing to load the
# actual data with "getobs" itself.
@inline gettargets(data) = gettargets(DataSubset(data))
@inline gettargets(data, obsdim::Union{Tuple, ObsDimension}) =
    gettargets(DataSubset(data, obsdim))

# We use this _gettargets_dispatch_idx function to avoid ambiguity
@inline gettargets(data, idx, args...) =
    _gettargets_dispatch_idx(data, idx, args...)

@inline _gettargets_dispatch_idx(data, idx, args...) =
    gettargets(obsview(DataSubset(data, idx, args...)))

@inline _gettargets_dispatch_idx(data, idx::Int, args...) =
    gettarget(identity, getobs_targetfun(datasubset(data, idx, args...)))

# This method prevents ObsView to happen by default for Arrays.
# Thus targets will return arrays in their original shape.
@inline gettargets(data::AbstractArray, obsdim::ObsDimension) = getobs(data)
@inline gettargets(data::AbstractArray, idx, obsdim) = getobs(data, idx, obsdim)

# DataSubset will query the underlying data using "gettargets"
# this way custom data storage types can provide the targets
# without having to trigger "getobs". Support optional
@inline gettargets(subset::DataSubset) =
    _gettargets(subset.data, subset.indices, subset.obsdim)

@inline gettargets(subset::DataSubset, idx) =
    _gettargets(subset.data, _view(subset.indices, idx), subset.obsdim)

function gettargets(subset::DataSubset, obsdim::Union{Tuple, ObsDimension})
    @assert obsdim === subset.obsdim
    _gettargets(subset.data, subset.indices, subset.obsdim)
end

function gettargets(subset::DataSubset, idx, obsdim::ObsDimension)
    @assert obsdim === subset.obsdim
    gettargets(subset, idx)
end

function gettargets(data::AbstractObsView)
    map(x->gettarget(identity,getobs_targetfun(x)), data)
end

gettargets(tup::Tuple) = map(gettargets, tup)

# --------------------------------------------------------------------
# targets (exported API)

"""
    targets([f], data, [obsdim])

Extract the concrete targets from `data` and return them.

This function is eager in the sense that it will always call
[`getobs`](@ref) unless a custom method for [`gettargets`](@ref)
is implemented for the type of `data`. This will make sure that
actual values are returned (in contrast to placeholders such as
`DataSubset` or `SubArray`).

```julia
julia> targets(DataSubset([1,2,3]))
3-element Array{Int64,1}:
 1
 2
 3
```

If `data` is a tuple, then the convention is that the last
element of the tuple contains the targets and the function is
recursed once (and only once).

```julia
julia> targets(([1,2], [3,4]))
2-element Array{Int64,1}:
 3
 4

julia> targets(([1,2], ([3,4], [5,6])))
([3,4],[5,6])
```

If `f` is provided, then [`gettarget`](@ref) will be applied to
each observation in `data` and the results will be returned as a
vector.

```julia
julia> targets(argmax, [1 0 1; 0 1 0])
3-element Array{Int64,1}:
 1
 2
 1
```

The optional parameter `obsdim` can be used to specify which
dimension denotes the observations, if that concept makes sense
for the type of `data`. See `?ObsDim` for more information.

```julia
julia> targets(argmax, [1 0; 0 1; 1 0], obsdim=1)
3-element Array{Int64,1}:
 1
 2
 1
```
"""
targets

# keyword based convenience API
targets(data; obsdim=default_obsdim(data)) =
    targets(identity, data, convert(LearnBase.ObsDimension,obsdim))

targets(f, data; obsdim=default_obsdim(data)) =
    targets(f, data, convert(LearnBase.ObsDimension,obsdim))

# default to identity function. This is later dispatched on
@inline targets(data, obsdim::ObsDimension) =
    targets(identity, data, obsdim)

@inline targets(tup::Tuple, obsdim::Tuple) =
    targets(identity, tup, obsdim)

# only dispatch on tuples once (nested tuples are not interpreted)
# here we swapped the naming convention because the exposed function
# should always be the one without an "_"
# i.e. "targets" interprets tuple, while "_targets" does not
# that means that "targets((X,(Y1,Y2)))" --> "(Y1,Y2)", and NOT "Y2"
function targets(f, tup::NTuple{N,Any}, obsdim::ObsDimension) where N
    _check_nobs(tup, obsdim)
    _targets(f, tup[N], obsdim)
end

function targets(f, tup::NTuple{N,Any}, obsdim::Tuple) where N
    _check_nobs(tup, obsdim)
    _targets(f, tup[N], obsdim[N])
end

@inline targets(f, data, obsdim) = _targets(f, data, obsdim)

# Batch Views
targets(f, data::AbstractBatchView, obsdim) =
    map(x->targets(f,x), data)

# Obs Views
targets(f, data::AbstractObsView, obsdim) =
    map(x->_gettarget(f,x), data)

# custom "_" function to not recurse on tuples
# Here we decide if "getobs" will be triggered based on "f"
@inline _targets(f::typeof(identity), data, obsdim) =
    _gettargets(data, obsdim)

_targets(f, data, obsdim) =
    map(x->gettarget(f,getobs_targetfun(x)), obsview(data, obsdim))

# --------------------------------------------------------------------
# eachtarget (lazy version of targets for iterating)

# keyword based convenience API
eachtarget(data; obsdim=default_obsdim(data)) =
    eachtarget(identity, data, convert(LearnBase.ObsDimension,obsdim))

eachtarget(f, data; obsdim=default_obsdim(data)) =
    eachtarget(f, data, convert(LearnBase.ObsDimension,obsdim))

@inline eachtarget(data, obsdim::ObsDimension) =
    eachtarget(identity, data, obsdim)

@inline eachtarget(tup::Tuple, obsdim::Tuple) =
    eachtarget(identity, tup, obsdim)

# go with _gettargets (avoids getobs)

eachtarget(f::typeof(identity), data, obsdim) =
    (_gettargets(data, i, obsdim) for i in 1:nobs(data,obsdim))

function eachtarget(f::typeof(identity), tup::NTuple{N,Any}, obsdim) where N
    _check_nobs(tup, obsdim)
    (_gettargets(tup[N], i, obsdim) for i in 1:nobs(tup[N],obsdim))
end

function eachtarget(f::typeof(identity), tup::NTuple{N,Any}, obsdim::Tuple) where N
    _check_nobs(tup, obsdim)
    (_gettargets(tup[N], i, obsdim[N]) for i in 1:nobs(tup[N],obsdim[N]))
end

# go with _gettarget (triggers getobs)

@inline eachtarget(f, data, obsdim) =
    eachtarget(f, obsview(data, obsdim))

function eachtarget(f::typeof(identity), data::AbstractObsView, obsdim=default_obsdim(data))
    @assert obsdim === default_obsdim(data)
    (_gettarget(f,x) for x in data)
end

function eachtarget(f, data::AbstractObsView, obsdim=default_obsdim(data))
    @assert obsdim === default_obsdim(data)
    (_gettarget(f,x) for x in data)
end