def from_json()

in aws_emr_launch/constructs/emr_constructs/emr_profile.py [0:0]


    def from_json(self, property_values: Dict[str, Any]) -> "EMRProfile":
        self._profile_name = property_values["ProfileName"]
        self._namespace = property_values["Namespace"]
        self._mutable_instance_role = property_values["MutableInstanceRole"]
        self._mutable_security_groups = property_values["MutableSecurityGroups"]

        vpc_id = property_values.get("Vpc", None)
        self._vpc = ec2.Vpc.from_lookup(self, "Vpc", vpc_id=vpc_id) if vpc_id else None

        security_groups_ids = property_values["SecurityGroups"]
        self._security_groups = EMRSecurityGroups.from_security_group_ids(
            self,
            "SecurityGroups",
            security_groups_ids["MasterGroup"],
            security_groups_ids["WorkersGroup"],
            security_groups_ids["ServiceGroup"],
            mutable=self._mutable_security_groups,
        )

        role_arns = property_values["Roles"]
        self._roles = EMRRoles.from_role_arns(
            self,
            "Roles",
            role_arns["ServiceRole"],
            role_arns["InstanceRole"],
            role_arns["AutoScalingRole"],
            mutable=self._mutable_instance_role,
        )

        artifacts_bucket = property_values.get("ArtifactsBucket", None)
        self._artifacts_bucket = (
            s3.Bucket.from_bucket_name(self, "ArtifactsBucket", artifacts_bucket) if artifacts_bucket else None
        )
        self._artifacts_path = property_values.get("ArtifactsPath", None)

        logs_bucket = property_values.get("LogsBucket", None)
        self._logs_bucket = s3.Bucket.from_bucket_name(self, "LogsBucket", logs_bucket) if logs_bucket else None
        self._logs_path = property_values.get("LogsPath", None)

        self._s3_encryption_configuration = property_values.get("S3EncryptionConfiguration", None)
        self._local_disk_encryption_configuration = property_values.get("LocalDiskEncryptionConfiguration", None)
        self._tls_certificate_configuration = property_values.get("TLSCertificateConfiguration", None)
        self._kerberos_configuration = property_values.get("KerberosConfiguration", None)

        kerberos_attributes_secret = property_values.get("KerberosAttributesSecret", None)
        self._kerberos_attributes_secret = (
            secretsmanager.Secret.from_secret_arn(self, "KerberosAttributesSecret", kerberos_attributes_secret)
            if kerberos_attributes_secret is not None
            else None
        )

        self._emrfs_configuration = property_values.get("EmrFsConfiguration", None)
        self._lake_formation_configuration = property_values.get("LakeFormationConfiguration", None)
        self._security_configuration_name = property_values.get("SecurityConfiguration", None)
        self._description = property_values.get("Description", None)
        self._rehydrated = True
        return self