dns¶
Table of Contents
Client¶
-
class
dns.
Client
¶ A low-level client representing NIFCLOUD DNS
client = session.create_client('dns')
These are the available methods:
can_paginate()
change_resource_record_sets()
create_hosted_zone()
delete_hosted_zone()
generate_presigned_url()
get_change()
get_hosted_zone()
get_paginator()
get_waiter()
list_hosted_zones()
list_resource_record_sets()
-
can_paginate
(operation_name)¶ Check if an operation can be paginated.
Parameters: operation_name (string) – The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo
, and you’d normally invoke the operation asclient.create_foo(**kwargs)
, if thecreate_foo
operation can be paginated, you can use the callclient.get_paginator("create_foo")
.Returns: True
if the operation can be paginated,False
otherwise.
-
change_resource_record_sets
(**kwargs)¶ See also: NIFCLOUD API Documentation
Request Syntax
response = client.change_resource_record_sets( Comment='string', RequestChangeBatch={ 'ListOfRequestChanges': [ { 'RequestChange': { 'Action': 'CREATE'|'DELETE', 'RequestResourceRecordSet': { 'Failover': 'PRIMARY'|'SECONDARY', 'ListOfRequestResourceRecords': [ { 'RequestResourceRecord': { 'Value': 'string' } }, ], 'Name': 'string', 'Region': 'string', 'RequestXniftyHealthCheckConfig': { 'FullyQualifiedDomainName': 'string', 'IPAddress': 'string', 'Port': 123, 'Protocol': 'HTTP'|'HTTPS'|'TCP', 'ResourcePath': 'string' }, 'SetIdentifier': 'string', 'TTL': 123, 'Type': 'NS'|'A'|'AAAA'|'CNAME'|'MX'|'TXT'|'PTR'|'LBR', 'Weight': 123, 'XniftyComment': 'string', 'XniftyDefaultHost': 'string' } } }, ] }, ZoneID='string' )
Parameters: - Comment (string) –
- RequestChangeBatch (dict) –
[REQUIRED]
- ListOfRequestChanges (list) – [REQUIRED]
- (dict) –
- RequestChange (dict) – [REQUIRED]
- Action (string) – [REQUIRED]
- RequestResourceRecordSet (dict) –
- Failover (string) –
- ListOfRequestResourceRecords (list) –
- (dict) –
- RequestResourceRecord (dict) –
- Value (string) –
- RequestResourceRecord (dict) –
- (dict) –
- Name (string) –
- Region (string) –
- RequestXniftyHealthCheckConfig (dict) –
- FullyQualifiedDomainName (string) –
- IPAddress (string) –
- Port (integer) –
- Protocol (string) –
- ResourcePath (string) –
- SetIdentifier (string) –
- TTL (integer) –
- Type (string) –
- Weight (integer) –
- XniftyComment (string) –
- XniftyDefaultHost (string) –
- RequestChange (dict) – [REQUIRED]
- (dict) –
- ListOfRequestChanges (list) – [REQUIRED]
- ZoneID (string) – [REQUIRED]
Return type: dict
Returns: Response Syntax
{ 'ChangeInfo': { 'Id': 'string', 'Status': 'string', 'SubmittedAt': 'string' } }
Response Structure
- (dict) –
- ChangeInfo (dict) –
- Id (string) –
- Status (string) –
- SubmittedAt (string) –
- ChangeInfo (dict) –
-
create_hosted_zone
(**kwargs)¶ See also: NIFCLOUD API Documentation
Request Syntax
response = client.create_hosted_zone( CallerReference='string', Name='string', RequestHostedZoneConfig={ 'Comment': 'string' } )
Parameters: - CallerReference (string) –
- Name (string) – [REQUIRED]
- RequestHostedZoneConfig (dict) –
- Comment (string) –
Return type: dict
Returns: Response Syntax
{ 'ChangeInfo': { 'Id': 'string', 'Status': 'string', 'SubmittedAt': 'string' }, 'DelegationSet': { 'NameServers': [ 'string', ] }, 'HostedZone': { 'CallerReference': 'string', 'Config': { 'Comment': 'string' }, 'Id': 'string', 'Name': 'string', 'ResourceRecordSetCount': 123 } }
Response Structure
- (dict) –
- ChangeInfo (dict) –
- Id (string) –
- Status (string) –
- SubmittedAt (string) –
- DelegationSet (dict) –
- NameServers (list) –
- (string) –
- NameServers (list) –
- HostedZone (dict) –
- CallerReference (string) –
- Config (dict) –
- Comment (string) –
- Id (string) –
- Name (string) –
- ResourceRecordSetCount (integer) –
- ChangeInfo (dict) –
-
delete_hosted_zone
(**kwargs)¶ See also: NIFCLOUD API Documentation
Request Syntax
response = client.delete_hosted_zone( ZoneID='string' )
Parameters: ZoneID (string) – [REQUIRED] Return type: dict Returns: Response Syntax { 'ChangeInfo': { 'Id': 'string', 'Status': 'string', 'SubmittedAt': 'string' } }
Response Structure
- (dict) –
- ChangeInfo (dict) –
- Id (string) –
- Status (string) –
- SubmittedAt (string) –
- ChangeInfo (dict) –
- (dict) –
-
generate_presigned_url
(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶ Generate a presigned url given a client, its method, and arguments
Parameters: - ClientMethod (string) – The client method to presign for
- Params (dict) – The parameters normally passed to
ClientMethod
. - ExpiresIn (int) – The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
- HttpMethod (string) – The http method to use on the generated url. By default, the http method is whatever is used in the method’s model.
Returns: The presigned url
-
get_change
(**kwargs)¶ See also: NIFCLOUD API Documentation
Request Syntax
response = client.get_change( ChangeID='string' )
Parameters: ChangeID (string) – [REQUIRED] Return type: dict Returns: Response Syntax { 'ChangeInfo': { 'Id': 'string', 'Status': 'string', 'SubmittedAt': 'string' } }
Response Structure
- (dict) –
- ChangeInfo (dict) –
- Id (string) –
- Status (string) –
- SubmittedAt (string) –
- ChangeInfo (dict) –
- (dict) –
-
get_hosted_zone
(**kwargs)¶ See also: NIFCLOUD API Documentation
Request Syntax
response = client.get_hosted_zone( ZoneID='string' )
Parameters: ZoneID (string) – [REQUIRED] Return type: dict Returns: Response Syntax { 'DelegationSet': { 'NameServers': [ 'string', ] }, 'HostedZone': { 'CallerReference': 'string', 'Config': { 'Comment': 'string' }, 'Id': 'string', 'Name': 'string', 'ResourceRecordSetCount': 123 } }
Response Structure
- (dict) –
- DelegationSet (dict) –
- NameServers (list) –
- (string) –
- NameServers (list) –
- HostedZone (dict) –
- CallerReference (string) –
- Config (dict) –
- Comment (string) –
- Id (string) –
- Name (string) –
- ResourceRecordSetCount (integer) –
- DelegationSet (dict) –
- (dict) –
-
get_paginator
(operation_name)¶ Create a paginator for an operation.
Parameters: operation_name (string) – The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo
, and you’d normally invoke the operation asclient.create_foo(**kwargs)
, if thecreate_foo
operation can be paginated, you can use the callclient.get_paginator("create_foo")
.Raises: OperationNotPageableError – Raised if the operation is not pageable. You can use the client.can_paginate
method to check if an operation is pageable.Return type: L{botocore.paginate.Paginator} Returns: A paginator object.
-
get_waiter
(waiter_name)¶ Returns an object that can wait for some condition.
Parameters: waiter_name (str) – The name of the waiter to get. See the waiters section of the service docs for a list of available waiters. Returns: The specified waiter object. Return type: botocore.waiter.Waiter
-
list_hosted_zones
(**kwargs)¶ See also: NIFCLOUD API Documentation
Request Syntax
response = client.list_hosted_zones( Marker='string', Maxitems=123 )
Parameters: - Marker (string) –
- Maxitems (integer) –
Return type: dict
Returns: Response Syntax
{ 'HostedZones': [ { 'CallerReference': 'string', 'Config': { 'Comment': 'string' }, 'Id': 'string', 'Name': 'string', 'ResourceRecordSetCount': 123 }, ], 'IsTruncated': True|False, 'Marker': 'string', 'MaxItems': 123, 'NextMarker': 'string' }
Response Structure
- (dict) –
- HostedZones (list) –
- (dict) –
- CallerReference (string) –
- Config (dict) –
- Comment (string) –
- Id (string) –
- Name (string) –
- ResourceRecordSetCount (integer) –
- (dict) –
- IsTruncated (boolean) –
- Marker (string) –
- MaxItems (integer) –
- NextMarker (string) –
- HostedZones (list) –
-
list_resource_record_sets
(**kwargs)¶ See also: NIFCLOUD API Documentation
Request Syntax
response = client.list_resource_record_sets( Identifier='string', Maxitems=123, Name='string', Type='NS'|'A'|'AAAA'|'CNAME'|'MX'|'TXT'|'PTR'|'LBR', ZoneID='string' )
Parameters: - Identifier (string) –
- Maxitems (integer) –
- Name (string) –
- Type (string) –
- ZoneID (string) – [REQUIRED]
Return type: dict
Returns: Response Syntax
{ 'IsTruncated': True|False, 'MaxItems': 123, 'NextRecordIdentifier': 'string', 'NextRecordName': 'string', 'NextRecordType': 'string', 'ResourceRecordSets': [ { 'Failover': 'string', 'Name': 'string', 'Region': 'string', 'ResourceRecords': [ { 'Value': 'string' }, ], 'SetIdentifier': 'string', 'TTL': 123, 'Type': 'string', 'Weight': 123, 'XniftyComment': 'string', 'XniftyDefaultHost': 'string', 'XniftyHealthCheckConfig': { 'FullyQualifiedDomainName': 'string', 'IPAddress': 'string', 'Port': 123, 'Protocol': 'string', 'ResourcePath': 'string' } }, ] }
Response Structure
- (dict) –
- IsTruncated (boolean) –
- MaxItems (integer) –
- NextRecordIdentifier (string) –
- NextRecordName (string) –
- NextRecordType (string) –
- ResourceRecordSets (list) –
- (dict) –
- Failover (string) –
- Name (string) –
- Region (string) –
- ResourceRecords (list) –
- (dict) –
- Value (string) –
- (dict) –
- SetIdentifier (string) –
- TTL (integer) –
- Type (string) –
- Weight (integer) –
- XniftyComment (string) –
- XniftyDefaultHost (string) –
- XniftyHealthCheckConfig (dict) –
- FullyQualifiedDomainName (string) –
- IPAddress (string) –
- Port (integer) –
- Protocol (string) –
- ResourcePath (string) –
- (dict) –
Client Exceptions¶
Client exceptions are available on a client instance via the exceptions
property. For more detailed instructions and examples on the exact usage of client exceptions, see the error handling user guide.
This client has no modeled exception classes.