Partager via


ResourceSharingProfile Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.models.ResourceSharingProfile

Implements

public final class ResourceSharingProfile
implements JsonSerializable<ResourceSharingProfile>

The ResourceSharingProfile model.

Constructor Summary

Constructor Description
ResourceSharingProfile()

Creates an instance of ResourceSharingProfile class.

Method Summary

Modifier and Type Method and Description
static ResourceSharingProfile fromJson(JsonReader jsonReader)

Reads an instance of ResourceSharingProfile from the JsonReader.

List<SubResource> subscriptionIds()

Get the subscriptionIds property: Specifies an array of subscription resource IDs that capacity reservation group is shared with.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ResourceSharingProfile withSubscriptionIds(List<SubResource> subscriptionIds)

Set the subscriptionIds property: Specifies an array of subscription resource IDs that capacity reservation group is shared with.

Methods inherited from java.lang.Object

Constructor Details

ResourceSharingProfile

public ResourceSharingProfile()

Creates an instance of ResourceSharingProfile class.

Method Details

fromJson

public static ResourceSharingProfile fromJson(JsonReader jsonReader)

Reads an instance of ResourceSharingProfile from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ResourceSharingProfile 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 ResourceSharingProfile.

subscriptionIds

public List subscriptionIds()

Get the subscriptionIds property: Specifies an array of subscription resource IDs that capacity reservation group is shared with. **Note:** Minimum api-version: 2023-09-01. Please refer to https://aka.ms/computereservationsharing for more details.

Returns:

the subscriptionIds value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withSubscriptionIds

public ResourceSharingProfile withSubscriptionIds(List subscriptionIds)

Set the subscriptionIds property: Specifies an array of subscription resource IDs that capacity reservation group is shared with. **Note:** Minimum api-version: 2023-09-01. Please refer to https://aka.ms/computereservationsharing for more details.

Parameters:

subscriptionIds - the subscriptionIds value to set.

Returns:

the ResourceSharingProfile object itself.

Applies to