'Django Pass Parameters in function

I have to update four A records in AWS for that I have. used boto3 python library and for each one I have written the functions as Follows

@csrf_exempt
@wrap_view
def create_A_record_1(request):

response = client.change_resource_record_sets(
    HostedZoneId='**********',
    ChangeBatch={
        'Comment': 'string',
        'Changes': [
            {
                'Action': 'CREATE',
                'ResourceRecordSet': {
                    'Name': 'one.example.com',
                    'Type': 'A',
                    'SetIdentifier': 'main',
                    'Weight': 100,
                    'TTL': 300,
                    'ResourceRecords': [
                        {
                            'Value': '1.2.2.3'
                        },
                    ],                
                    
                }
            },
        ]
    }
)

How can I create the POST function and pass the variable in that ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source