Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.appservice.generated;

/**
* Samples for DomainRegistrationProvider ListOperations.
*/
public final class DomainRegistrationProviderListOperationsSamples {
/*
* x-ms-original-file:
* specification/domainregistration/resource-manager/Microsoft.DomainRegistration/DomainRegistration/stable/2024-11-
* 01/examples/ListOperations.json
*/
/**
* Sample code: List operations.
*
* @param manager Entry point to AppServiceManager.
*/
public static void listOperations(com.azure.resourcemanager.appservice.AppServiceManager manager) {
manager.domainRegistrationClient()
.getDomainRegistrationProviders()
.listOperations(com.azure.core.util.Context.NONE);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.appservice.generated;

import com.azure.resourcemanager.appservice.fluent.models.NameIdentifierInner;

/**
* Samples for Domains CheckAvailability.
*/
public final class DomainsCheckAvailabilitySamples {
/*
* x-ms-original-file:
* specification/domainregistration/resource-manager/Microsoft.DomainRegistration/DomainRegistration/stable/2024-11-
* 01/examples/CheckDomainAvailability.json
*/
/**
* Sample code: Check domain availability.
*
* @param manager Entry point to AppServiceManager.
*/
public static void checkDomainAvailability(com.azure.resourcemanager.appservice.AppServiceManager manager) {
manager.domainRegistrationClient()
.getDomains()
.checkAvailabilityWithResponse(new NameIdentifierInner().withName("abcd.com"),
com.azure.core.util.Context.NONE);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.appservice.generated;

import com.azure.resourcemanager.appservice.fluent.models.DomainOwnershipIdentifierInner;

/**
* Samples for Domains CreateOrUpdateOwnershipIdentifier.
*/
public final class DomainsCreateOrUpdateOwnershipIdentifierSamples {
/*
* x-ms-original-file:
* specification/domainregistration/resource-manager/Microsoft.DomainRegistration/DomainRegistration/stable/2024-11-
* 01/examples/CreateAppServiceDomainOwnershipIdentifier.json
*/
/**
* Sample code: Create App Service Domain OwnershipIdentifier.
*
* @param manager Entry point to AppServiceManager.
*/
public static void
createAppServiceDomainOwnershipIdentifier(com.azure.resourcemanager.appservice.AppServiceManager manager) {
manager.domainRegistrationClient()
.getDomains()
.createOrUpdateOwnershipIdentifierWithResponse("testrg123", "example.com", "SampleOwnershipId",
new DomainOwnershipIdentifierInner().withOwnershipId("SampleOwnershipId"),
com.azure.core.util.Context.NONE);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.appservice.generated;

import com.azure.resourcemanager.appservice.fluent.models.DomainInner;
import com.azure.resourcemanager.appservice.models.Address;
import com.azure.resourcemanager.appservice.models.Contact;
import com.azure.resourcemanager.appservice.models.DnsType;
import com.azure.resourcemanager.appservice.models.DomainPurchaseConsent;
import java.time.OffsetDateTime;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

/**
* Samples for Domains CreateOrUpdate.
*/
public final class DomainsCreateOrUpdateSamples {
/*
* x-ms-original-file:
* specification/domainregistration/resource-manager/Microsoft.DomainRegistration/DomainRegistration/stable/2024-11-
* 01/examples/CreateAppServiceDomain.json
*/
/**
* Sample code: Create App Service Domain.
*
* @param manager Entry point to AppServiceManager.
*/
public static void createAppServiceDomain(com.azure.resourcemanager.appservice.AppServiceManager manager) {
manager.domainRegistrationClient()
.getDomains()
.createOrUpdate("testrg123", "example.com",
new DomainInner().withLocation("global")
.withTags(mapOf())
.withContactAdmin(new Contact()
.withAddressMailing(new Address().withAddress1("3400 State St")
.withCity("Chicago")
.withCountry("United States")
.withPostalCode("fakeTokenPlaceholder")
.withState("IL"))
.withEmail("admin@email.com")
.withFax("1-245-534-2242")
.withJobTitle("Admin")
.withNameFirst("John")
.withNameLast("Doe")
.withNameMiddle("")
.withOrganization("Microsoft Inc.")
.withPhone("1-245-534-2242"))
.withContactBilling(new Contact()
.withAddressMailing(new Address().withAddress1("3400 State St")
.withCity("Chicago")
.withCountry("United States")
.withPostalCode("fakeTokenPlaceholder")
.withState("IL"))
.withEmail("billing@email.com")
.withFax("1-245-534-2242")
.withJobTitle("Billing")
.withNameFirst("John")
.withNameLast("Doe")
.withNameMiddle("")
.withOrganization("Microsoft Inc.")
.withPhone("1-245-534-2242"))
.withContactRegistrant(new Contact()
.withAddressMailing(new Address().withAddress1("3400 State St")
.withCity("Chicago")
.withCountry("United States")
.withPostalCode("fakeTokenPlaceholder")
.withState("IL"))
.withEmail("registrant@email.com")
.withFax("1-245-534-2242")
.withJobTitle("Registrant")
.withNameFirst("John")
.withNameLast("Doe")
.withNameMiddle("")
.withOrganization("Microsoft Inc.")
.withPhone("1-245-534-2242"))
.withContactTech(new Contact()
.withAddressMailing(new Address().withAddress1("3400 State St")
.withCity("Chicago")
.withCountry("United States")
.withPostalCode("fakeTokenPlaceholder")
.withState("IL"))
.withEmail("tech@email.com")
.withFax("1-245-534-2242")
.withJobTitle("Tech")
.withNameFirst("John")
.withNameLast("Doe")
.withNameMiddle("")
.withOrganization("Microsoft Inc.")
.withPhone("1-245-534-2242"))
.withPrivacy(false)
.withAutoRenew(true)
.withConsent(new DomainPurchaseConsent().withAgreementKeys(Arrays.asList("agreementKey1"))
.withAgreedBy("192.0.2.1")
.withAgreedAt(OffsetDateTime.parse("2021-09-10T19:30:53Z")))
.withDnsType(DnsType.DEFAULT_DOMAIN_REGISTRAR_DNS)
.withAuthCode("fakeTokenPlaceholder"),
com.azure.core.util.Context.NONE);
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.appservice.generated;

/**
* Samples for Domains DeleteOwnershipIdentifier.
*/
public final class DomainsDeleteOwnershipIdentifierSamples {
/*
* x-ms-original-file:
* specification/domainregistration/resource-manager/Microsoft.DomainRegistration/DomainRegistration/stable/2024-11-
* 01/examples/DeleteAppServiceDomainOwnershipIdentifier.json
*/
/**
* Sample code: Delete App Service Domain Ownership Identifier.
*
* @param manager Entry point to AppServiceManager.
*/
public static void
deleteAppServiceDomainOwnershipIdentifier(com.azure.resourcemanager.appservice.AppServiceManager manager) {
manager.domainRegistrationClient()
.getDomains()
.deleteOwnershipIdentifierWithResponse("testrg123", "example.com", "ownershipIdentifier",
com.azure.core.util.Context.NONE);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.appservice.generated;

/**
* Samples for Domains Delete.
*/
public final class DomainsDeleteSamples {
/*
* x-ms-original-file:
* specification/domainregistration/resource-manager/Microsoft.DomainRegistration/DomainRegistration/stable/2024-11-
* 01/examples/DeleteAppServiceDomain.json
*/
/**
* Sample code: Delete App Service Domain.
*
* @param manager Entry point to AppServiceManager.
*/
public static void deleteAppServiceDomain(com.azure.resourcemanager.appservice.AppServiceManager manager) {
manager.domainRegistrationClient()
.getDomains()
.deleteWithResponse("testrg123", "example.com", true, com.azure.core.util.Context.NONE);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.appservice.generated;

/**
* Samples for Domains GetByResourceGroup.
*/
public final class DomainsGetByResourceGroupSamples {
/*
* x-ms-original-file:
* specification/domainregistration/resource-manager/Microsoft.DomainRegistration/DomainRegistration/stable/2024-11-
* 01/examples/GetDomain.json
*/
/**
* Sample code: Get Domain.
*
* @param manager Entry point to AppServiceManager.
*/
public static void getDomain(com.azure.resourcemanager.appservice.AppServiceManager manager) {
manager.domainRegistrationClient()
.getDomains()
.getByResourceGroupWithResponse("testrg123", "example.com", com.azure.core.util.Context.NONE);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.appservice.generated;

/**
* Samples for Domains GetControlCenterSsoRequest.
*/
public final class DomainsGetControlCenterSsoRequestSamples {
/*
* x-ms-original-file:
* specification/domainregistration/resource-manager/Microsoft.DomainRegistration/DomainRegistration/stable/2024-11-
* 01/examples/GetDomainControlCenterSsoRequest.json
*/
/**
* Sample code: Get Domain Control Center Sso Request.
*
* @param manager Entry point to AppServiceManager.
*/
public static void
getDomainControlCenterSsoRequest(com.azure.resourcemanager.appservice.AppServiceManager manager) {
manager.domainRegistrationClient()
.getDomains()
.getControlCenterSsoRequestWithResponse(com.azure.core.util.Context.NONE);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.appservice.generated;

/**
* Samples for Domains GetOwnershipIdentifier.
*/
public final class DomainsGetOwnershipIdentifierSamples {
/*
* x-ms-original-file:
* specification/domainregistration/resource-manager/Microsoft.DomainRegistration/DomainRegistration/stable/2024-11-
* 01/examples/GetDomainOwnershipIdentifier.json
*/
/**
* Sample code: Get Domain Ownership Identifier.
*
* @param manager Entry point to AppServiceManager.
*/
public static void getDomainOwnershipIdentifier(com.azure.resourcemanager.appservice.AppServiceManager manager) {
manager.domainRegistrationClient()
.getDomains()
.getOwnershipIdentifierWithResponse("testrg123", "example.com", "SampleOwnershipId",
com.azure.core.util.Context.NONE);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.appservice.generated;

/**
* Samples for Domains ListByResourceGroup.
*/
public final class DomainsListByResourceGroupSamples {
/*
* x-ms-original-file:
* specification/domainregistration/resource-manager/Microsoft.DomainRegistration/DomainRegistration/stable/2024-11-
* 01/examples/ListDomainsByResourceGroup.json
*/
/**
* Sample code: List domains by resource group.
*
* @param manager Entry point to AppServiceManager.
*/
public static void listDomainsByResourceGroup(com.azure.resourcemanager.appservice.AppServiceManager manager) {
manager.domainRegistrationClient()
.getDomains()
.listByResourceGroup("testrg123", com.azure.core.util.Context.NONE);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.appservice.generated;

/**
* Samples for Domains ListOwnershipIdentifiers.
*/
public final class DomainsListOwnershipIdentifiersSamples {
/*
* x-ms-original-file:
* specification/domainregistration/resource-manager/Microsoft.DomainRegistration/DomainRegistration/stable/2024-11-
* 01/examples/ListDomainOwnershipIdentifiers.json
*/
/**
* Sample code: List Domain Ownership Identifiers.
*
* @param manager Entry point to AppServiceManager.
*/
public static void listDomainOwnershipIdentifiers(com.azure.resourcemanager.appservice.AppServiceManager manager) {
manager.domainRegistrationClient()
.getDomains()
.listOwnershipIdentifiers("testrg123", "example.com", com.azure.core.util.Context.NONE);
}
}
Loading
Loading