Class SecurityPostureReferenceUpdate

java.lang.Object
com.azure.resourcemanager.compute.models.SecurityPostureReferenceUpdate
All Implemented Interfaces:
com.azure.json.JsonSerializable<SecurityPostureReferenceUpdate>

public final class SecurityPostureReferenceUpdate extends Object implements com.azure.json.JsonSerializable<SecurityPostureReferenceUpdate>
Specifies the security posture to be used in the scale set. Minimum api-version: 2023-03-01.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of SecurityPostureReferenceUpdate class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the excludeExtensions property: The list of virtual machine extension names to exclude when applying the security posture.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of SecurityPostureReferenceUpdate from the JsonReader.
    id()
    Get the id property: The security posture reference id in the form of /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|latest.
    Get the isOverridable property: Whether the security posture can be overridden by the user.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withExcludeExtensions(List<String> excludeExtensions)
    Set the excludeExtensions property: The list of virtual machine extension names to exclude when applying the security posture.
    Set the id property: The security posture reference id in the form of /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|latest.
    withIsOverridable(Boolean isOverridable)
    Set the isOverridable property: Whether the security posture can be overridden by the user.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • SecurityPostureReferenceUpdate

      public SecurityPostureReferenceUpdate()
      Creates an instance of SecurityPostureReferenceUpdate class.
  • Method Details

    • id

      public String id()
      Get the id property: The security posture reference id in the form of /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|latest.
      Returns:
      the id value.
    • withId

      Set the id property: The security posture reference id in the form of /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|latest.
      Parameters:
      id - the id value to set.
      Returns:
      the SecurityPostureReferenceUpdate object itself.
    • excludeExtensions

      public List<String> excludeExtensions()
      Get the excludeExtensions property: The list of virtual machine extension names to exclude when applying the security posture.
      Returns:
      the excludeExtensions value.
    • withExcludeExtensions

      public SecurityPostureReferenceUpdate withExcludeExtensions(List<String> excludeExtensions)
      Set the excludeExtensions property: The list of virtual machine extension names to exclude when applying the security posture.
      Parameters:
      excludeExtensions - the excludeExtensions value to set.
      Returns:
      the SecurityPostureReferenceUpdate object itself.
    • isOverridable

      public Boolean isOverridable()
      Get the isOverridable property: Whether the security posture can be overridden by the user.
      Returns:
      the isOverridable value.
    • withIsOverridable

      public SecurityPostureReferenceUpdate withIsOverridable(Boolean isOverridable)
      Set the isOverridable property: Whether the security posture can be overridden by the user.
      Parameters:
      isOverridable - the isOverridable value to set.
      Returns:
      the SecurityPostureReferenceUpdate object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<SecurityPostureReferenceUpdate>
      Throws:
      IOException
    • fromJson

      public static SecurityPostureReferenceUpdate fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of SecurityPostureReferenceUpdate from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of SecurityPostureReferenceUpdate if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the SecurityPostureReferenceUpdate.