Ec2InstanceAttributes.fromJson constructor
Ec2InstanceAttributes.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Ec2InstanceAttributes.fromJson(Map<String, dynamic> json) {
return Ec2InstanceAttributes(
additionalMasterSecurityGroups:
(json['AdditionalMasterSecurityGroups'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
additionalSlaveSecurityGroups:
(json['AdditionalSlaveSecurityGroups'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
ec2AvailabilityZone: json['Ec2AvailabilityZone'] as String?,
ec2KeyName: json['Ec2KeyName'] as String?,
ec2SubnetId: json['Ec2SubnetId'] as String?,
emrManagedMasterSecurityGroup:
json['EmrManagedMasterSecurityGroup'] as String?,
emrManagedSlaveSecurityGroup:
json['EmrManagedSlaveSecurityGroup'] as String?,
iamInstanceProfile: json['IamInstanceProfile'] as String?,
requestedEc2AvailabilityZones:
(json['RequestedEc2AvailabilityZones'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
requestedEc2SubnetIds: (json['RequestedEc2SubnetIds'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
serviceAccessSecurityGroup: json['ServiceAccessSecurityGroup'] as String?,
);
}