dns / Client / change_resource_record_sets

change_resource_record_sets

dns.Client.change_resource_record_sets(**kwargs)

レコードの作成、削除を行います。

リクエストボディにて作成/削除するレコード情報を入力し、それにもとづいてレコード情報の作成/削除が行われます。

1つのリクエスト内で複数のレコード作成/削除操作を指定できますが、処理の途中でエラーになった場合部分的な反映になる場合があります。

同じゾーンに対して同時に作成/削除操作のリクエストを行うと、エラーになる場合があります。

レコード作成/削除は即時反映ではないため、レスポンスには作成された更新リクエスト情報が含まれ、これの反映ステータスがPENDINGからINSYNCに変わったタイミングが反映完了となります。

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',
                        'Weight': 123,
                        'XniftyComment': '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) –

            • 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) –

  • 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) –