Создайте соглашение Confluent Marketplace в подписке.
PUT https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/agreements/default?api-version=2024-02-13
Параметры URI
Имя |
В |
Обязательно |
Тип |
Описание |
subscriptionId
|
path |
True
|
string
|
Идентификатор подписки Microsoft Azure
|
api-version
|
query |
True
|
string
|
Версия API клиента.
|
Текст запроса
Имя |
Тип |
Описание |
properties.accepted
|
boolean
|
Если какая-либо версия условий была принята, в противном случае — false.
|
properties.licenseTextLink
|
string
|
Ссылка на HTML с помощью условий майкрософт и издателя.
|
properties.plan
|
string
|
Строка идентификатора плана.
|
properties.privacyPolicyLink
|
string
|
Ссылка на политику конфиденциальности издателя.
|
properties.product
|
string
|
Строка идентификатора продукта.
|
properties.publisher
|
string
|
Строка идентификатора издателя.
|
properties.retrieveDatetime
|
string
|
Дата и время принятия условий в формате UTC. Этот параметр пуст, если значение Accepted имеет значение false.
|
properties.signature
|
string
|
Подпись терминов.
|
Ответы
Безопасность
azure_auth
Поток OAuth2 в Azure Active Directory.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Имя |
Описание |
user_impersonation
|
олицетворения учетной записи пользователя
|
Примеры
MarketplaceAgreements_Create
Sample Request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent/agreements/default?api-version=2024-02-13
/**
* Samples for MarketplaceAgreements Create.
*/
public final class Main {
/*
* x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/
* MarketplaceAgreements_Create.json
*/
/**
* Sample code: MarketplaceAgreements_Create.
*
* @param manager Entry point to ConfluentManager.
*/
public static void marketplaceAgreementsCreate(com.azure.resourcemanager.confluent.ConfluentManager manager) {
manager.marketplaceAgreements().createWithResponse(null, com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.confluent import ConfluentManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-confluent
# USAGE
python marketplace_agreements_create.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ConfluentManagementClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
response = client.marketplace_agreements.create()
print(response)
# x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/MarketplaceAgreements_Create.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armconfluent_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confluent/armconfluent"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/MarketplaceAgreements_Create.json
func ExampleMarketplaceAgreementsClient_Create() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armconfluent.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewMarketplaceAgreementsClient().Create(ctx, &armconfluent.MarketplaceAgreementsClientCreateOptions{Body: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AgreementResource = armconfluent.AgreementResource{
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Confluent/agreements"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent/agreements/default"),
// Properties: &armconfluent.AgreementProperties{
// Accepted: to.Ptr(true),
// LicenseTextLink: to.Ptr("test.licenseLink1"),
// Plan: to.Ptr("planid1"),
// PrivacyPolicyLink: to.Ptr("test.privacyPolicyLink1"),
// Product: to.Ptr("offid1"),
// Publisher: to.Ptr("pubid1"),
// RetrieveDatetime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-05T17:33:07.121Z"); return t}()),
// Signature: to.Ptr("YKWOQOKH2BCKZ46O7SCKHANWEENRFRU5WB4LXDFUYWCBWTS4AG4SGQXCOZYIR5ZJCZTXRMZKYZMO2BJSL5YKPLAR4LBFRUNS6CRYE7A"),
// },
// SystemData: &armconfluent.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-09T14:28:47.284Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armconfluent.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-09T14:28:47.284Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armconfluent.CreatedByTypeUser),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ConfluentManagementClient } = require("@azure/arm-confluent");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Create Confluent Marketplace agreement in the subscription.
*
* @summary Create Confluent Marketplace agreement in the subscription.
* x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/MarketplaceAgreements_Create.json
*/
async function marketplaceAgreementsCreate() {
const subscriptionId =
process.env["CONFLUENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new ConfluentManagementClient(credential, subscriptionId);
const result = await client.marketplaceAgreements.create();
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Confluent;
using Azure.ResourceManager.Confluent.Models;
using Azure.ResourceManager.Resources;
// Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/MarketplaceAgreements_Create.json
// this example is just showing the usage of "MarketplaceAgreements_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// invoke the operation
ConfluentAgreement result = await subscriptionResource.CreateMarketplaceAgreementAsync();
Console.WriteLine($"Succeeded: {result}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent/agreements/default",
"name": "default",
"type": "Microsoft.Confluent/agreements",
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-05-09T14:28:47.284Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-05-09T14:28:47.284Z"
},
"properties": {
"publisher": "pubid1",
"product": "offid1",
"plan": "planid1",
"licenseTextLink": "test.licenseLink1",
"privacyPolicyLink": "test.privacyPolicyLink1",
"retrieveDatetime": "2020-11-05T17:33:07.12132Z",
"signature": "YKWOQOKH2BCKZ46O7SCKHANWEENRFRU5WB4LXDFUYWCBWTS4AG4SGQXCOZYIR5ZJCZTXRMZKYZMO2BJSL5YKPLAR4LBFRUNS6CRYE7A",
"accepted": true
}
}
Определения
ConfluentAgreementResource
Определение условий соглашения
Имя |
Тип |
Описание |
id
|
string
|
Идентификатор ARM ресурса.
|
name
|
string
|
Имя соглашения.
|
properties.accepted
|
boolean
|
Если какая-либо версия условий была принята, в противном случае — false.
|
properties.licenseTextLink
|
string
|
Ссылка на HTML с помощью условий майкрософт и издателя.
|
properties.plan
|
string
|
Строка идентификатора плана.
|
properties.privacyPolicyLink
|
string
|
Ссылка на политику конфиденциальности издателя.
|
properties.product
|
string
|
Строка идентификатора продукта.
|
properties.publisher
|
string
|
Строка идентификатора издателя.
|
properties.retrieveDatetime
|
string
|
Дата и время принятия условий в формате UTC. Этот параметр пуст, если значение Accepted имеет значение false.
|
properties.signature
|
string
|
Подпись терминов.
|
systemData
|
systemData
|
Метаданные, относящиеся к созданию и последнему изменению ресурса
|
type
|
string
|
Тип соглашения.
|
createdByType
Тип удостоверения, создавшего ресурс.
Имя |
Тип |
Описание |
Application
|
string
|
|
Key
|
string
|
|
ManagedIdentity
|
string
|
|
User
|
string
|
|
ErrorResponseBody
ErrorResponseBody
Имя |
Тип |
Описание |
code
|
string
|
Код ошибки
|
details
|
ErrorResponseBody[]
|
Сведения об ошибках
|
message
|
string
|
Сообщение об ошибке
|
target
|
string
|
Целевой объект ошибки
|
ResourceProviderDefaultErrorResponse
ResourceProviderDefaultErrorResponse
systemData
Метаданные, относящиеся к созданию и последнему изменению ресурса.
Имя |
Тип |
Описание |
createdAt
|
string
|
Метка времени создания ресурса (UTC).
|
createdBy
|
string
|
Удостоверение, создающее ресурс.
|
createdByType
|
createdByType
|
Тип удостоверения, создавшего ресурс.
|
lastModifiedAt
|
string
|
Метка времени последнего изменения ресурса (UTC)
|
lastModifiedBy
|
string
|
Удостоверение, которое в последний раз изменял ресурс.
|
lastModifiedByType
|
createdByType
|
Тип удостоверения, изменяющего ресурс в последний раз.
|