createAccessSource
abstract suspend fun createAccessSource(input: CreateAccessSourceRequest): CreateAccessSourceResponse
Creates an access source for a DNS view. Access sources define IP addresses or CIDR ranges that are allowed to send DNS queries to the Route 53 Global Resolver, along with the permitted DNS protocols.
Samples
import aws.sdk.kotlin.services.route53globalresolver.model.DnsProtocol
import aws.sdk.kotlin.services.route53globalresolver.model.IpAddressType
fun main() {
//sampleStart
// CreateAccessSource example
val resp = route53GlobalResolverClient.createAccessSource {
cidr = "85.90.183.3/30"
clientToken = "9fas9-9usdfa-xbi8-kco"
dnsViewId = "dnsv-123456789"
ipAddressType = IpAddressType.fromValue("IPV4")
name = "My Access Source"
protocol = DnsProtocol.fromValue("DO53")
tags = mapOf<String, String>(
"Key1" to "Value1"
)
}
//sampleEnd
}