Hey, I have a personal project with a Python issue. I come from a Coding Background. My primary language has been Go.
I am trying to make this EC2 instance into its own class by moving its arguments into the init function. The arguments I'm trying to move are at the bottom if that makes sense, so the code at the bottom would be different. Just left it there to help with the question.
class ec2Args:
def __init__(self, filters=[],owners=[],*args):
self.filters = filters[aws.ec2.GetAmiFilterArgs(
name = "",
values=[],
),
aws.ec2.GetAmiFilterArgs(
name = "",
values= [],
),
],
self.owners = owners [""]
ubuntu = aws.ec2.get_ami(most_recent=True,
filters=[
aws.ec2.GetAmiFilterArgs(
name="name",
values=["ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*"],
),
aws.ec2.GetAmiFilterArgs(
name="virtualization-type",
values=["hvm"],
),
],
owners=["099720109477"])
Have I done this correctly to be able to call the class and pass in the values needed? What's throwing me is the list and the essentially AWS tuple arguments.
Please don't ask why it's a work project; they want it done this way.