Documentation ¶
Index ¶
- type AADBasedSecurityPrincipal
- type CertBasedSecurityPrincipal
- type CheckNameAvailabilityReason
- type CheckNameAvailabilityRequest
- type CheckNameAvailabilityResponse
- type Client
- type ClientCheckNameAvailabilityOptions
- type ClientCheckNameAvailabilityResponse
- type ClientFactory
- type ConfidentialLedger
- type CreatedByType
- type DeploymentType
- type LanguageRuntime
- type LedgerClient
- func (client *LedgerClient) BeginCreate(ctx context.Context, resourceGroupName string, ledgerName string, ...) (*runtime.Poller[LedgerClientCreateResponse], error)
- func (client *LedgerClient) BeginDelete(ctx context.Context, resourceGroupName string, ledgerName string, ...) (*runtime.Poller[LedgerClientDeleteResponse], error)
- func (client *LedgerClient) BeginUpdate(ctx context.Context, resourceGroupName string, ledgerName string, ...) (*runtime.Poller[LedgerClientUpdateResponse], error)
- func (client *LedgerClient) Get(ctx context.Context, resourceGroupName string, ledgerName string, ...) (LedgerClientGetResponse, error)
- func (client *LedgerClient) NewListByResourceGroupPager(resourceGroupName string, options *LedgerClientListByResourceGroupOptions) *runtime.Pager[LedgerClientListByResourceGroupResponse]
- func (client *LedgerClient) NewListBySubscriptionPager(options *LedgerClientListBySubscriptionOptions) *runtime.Pager[LedgerClientListBySubscriptionResponse]
- type LedgerClientBeginCreateOptions
- type LedgerClientBeginDeleteOptions
- type LedgerClientBeginUpdateOptions
- type LedgerClientCreateResponse
- type LedgerClientDeleteResponse
- type LedgerClientGetOptions
- type LedgerClientGetResponse
- type LedgerClientListByResourceGroupOptions
- type LedgerClientListByResourceGroupResponse
- type LedgerClientListBySubscriptionOptions
- type LedgerClientListBySubscriptionResponse
- type LedgerClientUpdateResponse
- type LedgerProperties
- type LedgerRoleName
- type LedgerType
- type List
- type ManagedCCF
- type ManagedCCFClient
- func (client *ManagedCCFClient) BeginCreate(ctx context.Context, resourceGroupName string, appName string, ...) (*runtime.Poller[ManagedCCFClientCreateResponse], error)
- func (client *ManagedCCFClient) BeginDelete(ctx context.Context, resourceGroupName string, appName string, ...) (*runtime.Poller[ManagedCCFClientDeleteResponse], error)
- func (client *ManagedCCFClient) BeginUpdate(ctx context.Context, resourceGroupName string, appName string, ...) (*runtime.Poller[ManagedCCFClientUpdateResponse], error)
- func (client *ManagedCCFClient) Get(ctx context.Context, resourceGroupName string, appName string, ...) (ManagedCCFClientGetResponse, error)
- func (client *ManagedCCFClient) NewListByResourceGroupPager(resourceGroupName string, options *ManagedCCFClientListByResourceGroupOptions) *runtime.Pager[ManagedCCFClientListByResourceGroupResponse]
- func (client *ManagedCCFClient) NewListBySubscriptionPager(options *ManagedCCFClientListBySubscriptionOptions) *runtime.Pager[ManagedCCFClientListBySubscriptionResponse]
- type ManagedCCFClientBeginCreateOptions
- type ManagedCCFClientBeginDeleteOptions
- type ManagedCCFClientBeginUpdateOptions
- type ManagedCCFClientCreateResponse
- type ManagedCCFClientDeleteResponse
- type ManagedCCFClientGetOptions
- type ManagedCCFClientGetResponse
- type ManagedCCFClientListByResourceGroupOptions
- type ManagedCCFClientListByResourceGroupResponse
- type ManagedCCFClientListBySubscriptionOptions
- type ManagedCCFClientListBySubscriptionResponse
- type ManagedCCFClientUpdateResponse
- type ManagedCCFList
- type ManagedCCFProperties
- type MemberIdentityCertificate
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type ProvisioningState
- type ResourceProviderOperationDefinition
- type ResourceProviderOperationDisplay
- type ResourceProviderOperationList
- type RunningState
- type SystemData
Examples ¶
- Client.CheckNameAvailability
- LedgerClient.BeginCreate
- LedgerClient.BeginDelete
- LedgerClient.BeginUpdate
- LedgerClient.Get
- LedgerClient.NewListByResourceGroupPager
- LedgerClient.NewListBySubscriptionPager
- ManagedCCFClient.BeginCreate
- ManagedCCFClient.BeginDelete
- ManagedCCFClient.BeginUpdate
- ManagedCCFClient.Get
- ManagedCCFClient.NewListByResourceGroupPager
- ManagedCCFClient.NewListBySubscriptionPager
- OperationsClient.NewListPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AADBasedSecurityPrincipal ¶
type AADBasedSecurityPrincipal struct { // LedgerRole associated with the Security Principal of Ledger LedgerRoleName *LedgerRoleName // UUID/GUID based Principal Id of the Security Principal PrincipalID *string // UUID/GUID based Tenant Id of the Security Principal TenantID *string }
AADBasedSecurityPrincipal - AAD based security principal with associated Ledger RoleName
func (AADBasedSecurityPrincipal) MarshalJSON ¶ added in v1.1.0
func (a AADBasedSecurityPrincipal) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AADBasedSecurityPrincipal.
func (*AADBasedSecurityPrincipal) UnmarshalJSON ¶ added in v1.1.0
func (a *AADBasedSecurityPrincipal) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AADBasedSecurityPrincipal.
type CertBasedSecurityPrincipal ¶
type CertBasedSecurityPrincipal struct { // Public key of the user cert (.pem or .cer) Cert *string // LedgerRole associated with the Security Principal of Ledger LedgerRoleName *LedgerRoleName }
CertBasedSecurityPrincipal - Cert based security principal with Ledger RoleName
func (CertBasedSecurityPrincipal) MarshalJSON ¶ added in v1.1.0
func (c CertBasedSecurityPrincipal) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CertBasedSecurityPrincipal.
func (*CertBasedSecurityPrincipal) UnmarshalJSON ¶ added in v1.1.0
func (c *CertBasedSecurityPrincipal) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CertBasedSecurityPrincipal.
type CheckNameAvailabilityReason ¶
type CheckNameAvailabilityReason string
CheckNameAvailabilityReason - The reason why the given name is not available.
const ( CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists" CheckNameAvailabilityReasonInvalid CheckNameAvailabilityReason = "Invalid" )
func PossibleCheckNameAvailabilityReasonValues ¶
func PossibleCheckNameAvailabilityReasonValues() []CheckNameAvailabilityReason
PossibleCheckNameAvailabilityReasonValues returns the possible values for the CheckNameAvailabilityReason const type.
type CheckNameAvailabilityRequest ¶
type CheckNameAvailabilityRequest struct { // The name of the resource for which availability needs to be checked. Name *string // The resource type. Type *string }
CheckNameAvailabilityRequest - The check availability request body.
func (CheckNameAvailabilityRequest) MarshalJSON ¶ added in v1.1.0
func (c CheckNameAvailabilityRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityRequest.
func (*CheckNameAvailabilityRequest) UnmarshalJSON ¶ added in v1.1.0
func (c *CheckNameAvailabilityRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityRequest.
type CheckNameAvailabilityResponse ¶
type CheckNameAvailabilityResponse struct { // Detailed reason why the given name is available. Message *string // Indicates if the resource name is available. NameAvailable *bool // The reason why the given name is not available. Reason *CheckNameAvailabilityReason }
CheckNameAvailabilityResponse - The check availability result.
func (CheckNameAvailabilityResponse) MarshalJSON ¶ added in v1.1.0
func (c CheckNameAvailabilityResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResponse.
func (*CheckNameAvailabilityResponse) UnmarshalJSON ¶ added in v1.1.0
func (c *CheckNameAvailabilityResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResponse.
type Client ¶ added in v0.2.0
type Client struct {
// contains filtered or unexported fields
}
Client contains the methods for the ConfidentialLedger group. Don't use this type directly, use NewClient() instead.
func NewClient ¶ added in v0.2.0
func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)
NewClient creates a new instance of Client with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*Client) CheckNameAvailability ¶ added in v0.2.0
func (client *Client) CheckNameAvailability(ctx context.Context, nameAvailabilityRequest CheckNameAvailabilityRequest, options *ClientCheckNameAvailabilityOptions) (ClientCheckNameAvailabilityResponse, error)
CheckNameAvailability - To check whether a resource name is available. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-01-26-preview
- nameAvailabilityRequest - Name availability request payload.
- options - ClientCheckNameAvailabilityOptions contains the optional parameters for the Client.CheckNameAvailability method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7e295a19c5382a4df2f8101e545fed34186d83bf/specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/CheckNameAvailability.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confidentialledger/armconfidentialledger" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armconfidentialledger.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().CheckNameAvailability(ctx, armconfidentialledger.CheckNameAvailabilityRequest{ Name: to.Ptr("sample-name"), Type: to.Ptr("Microsoft.ConfidentialLedger/ledgers"), }, 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.CheckNameAvailabilityResponse = armconfidentialledger.CheckNameAvailabilityResponse{ // NameAvailable: to.Ptr(true), // } }
Output:
type ClientCheckNameAvailabilityOptions ¶ added in v0.2.0
type ClientCheckNameAvailabilityOptions struct { }
ClientCheckNameAvailabilityOptions contains the optional parameters for the Client.CheckNameAvailability method.
type ClientCheckNameAvailabilityResponse ¶ added in v0.2.0
type ClientCheckNameAvailabilityResponse struct {
CheckNameAvailabilityResponse
}
ClientCheckNameAvailabilityResponse contains the response from method Client.CheckNameAvailability.
type ClientFactory ¶ added in v1.1.0
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶ added in v1.1.0
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewClient ¶ added in v1.1.0
func (c *ClientFactory) NewClient() *Client
func (*ClientFactory) NewLedgerClient ¶ added in v1.1.0
func (c *ClientFactory) NewLedgerClient() *LedgerClient
func (*ClientFactory) NewManagedCCFClient ¶
func (c *ClientFactory) NewManagedCCFClient() *ManagedCCFClient
func (*ClientFactory) NewOperationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
type ConfidentialLedger ¶
type ConfidentialLedger struct { // REQUIRED; The geo-location where the resource lives Location *string // Properties of Confidential Ledger Resource. Properties *LedgerProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ConfidentialLedger - Confidential Ledger. Contains the properties of Confidential Ledger Resource.
func (ConfidentialLedger) MarshalJSON ¶
func (c ConfidentialLedger) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConfidentialLedger.
func (*ConfidentialLedger) UnmarshalJSON ¶ added in v1.1.0
func (c *ConfidentialLedger) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConfidentialLedger.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type DeploymentType ¶
type DeploymentType struct { // Source Uri containing ManagedCCF code AppSourceURI *string // Unique name for the Managed CCF. LanguageRuntime *LanguageRuntime }
DeploymentType - Object representing DeploymentType for Managed CCF.
func (DeploymentType) MarshalJSON ¶
func (d DeploymentType) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeploymentType.
func (*DeploymentType) UnmarshalJSON ¶
func (d *DeploymentType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentType.
type LanguageRuntime ¶
type LanguageRuntime string
LanguageRuntime - Object representing LanguageRuntime for Manged CCF.
const ( LanguageRuntimeCPP LanguageRuntime = "CPP" LanguageRuntimeJS LanguageRuntime = "JS" )
func PossibleLanguageRuntimeValues ¶
func PossibleLanguageRuntimeValues() []LanguageRuntime
PossibleLanguageRuntimeValues returns the possible values for the LanguageRuntime const type.
type LedgerClient ¶
type LedgerClient struct {
// contains filtered or unexported fields
}
LedgerClient contains the methods for the Ledger group. Don't use this type directly, use NewLedgerClient() instead.
func NewLedgerClient ¶
func NewLedgerClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LedgerClient, error)
NewLedgerClient creates a new instance of LedgerClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*LedgerClient) BeginCreate ¶
func (client *LedgerClient) BeginCreate(ctx context.Context, resourceGroupName string, ledgerName string, confidentialLedger ConfidentialLedger, options *LedgerClientBeginCreateOptions) (*runtime.Poller[LedgerClientCreateResponse], error)
BeginCreate - Creates a Confidential Ledger with the specified ledger parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-01-26-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- ledgerName - Name of the Confidential Ledger
- confidentialLedger - Confidential Ledger Create Request Body
- options - LedgerClientBeginCreateOptions contains the optional parameters for the LedgerClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7e295a19c5382a4df2f8101e545fed34186d83bf/specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ConfidentialLedger_Create.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confidentialledger/armconfidentialledger" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armconfidentialledger.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLedgerClient().BeginCreate(ctx, "DummyResourceGroupName", "DummyLedgerName", armconfidentialledger.ConfidentialLedger{ Location: to.Ptr("EastUS"), Tags: map[string]*string{ "additionalProps1": to.Ptr("additional properties"), }, Properties: &armconfidentialledger.LedgerProperties{ AADBasedSecurityPrincipals: []*armconfidentialledger.AADBasedSecurityPrincipal{ { LedgerRoleName: to.Ptr(armconfidentialledger.LedgerRoleNameAdministrator), PrincipalID: to.Ptr("34621747-6fc8-4771-a2eb-72f31c461f2e"), TenantID: to.Ptr("bce123b9-2b7b-4975-8360-5ca0b9b1cd08"), }}, CertBasedSecurityPrincipals: []*armconfidentialledger.CertBasedSecurityPrincipal{ { Cert: to.Ptr("-----BEGIN CERTIFICATE-----MIIBsjCCATigAwIBAgIUZWIbyG79TniQLd2UxJuU74tqrKcwCgYIKoZIzj0EAwMwEDEOMAwGA1UEAwwFdXNlcjAwHhcNMjEwMzE2MTgwNjExWhcNMjIwMzE2MTgwNjExWjAQMQ4wDAYDVQQDDAV1c2VyMDB2MBAGByqGSM49AgEGBSuBBAAiA2IABBiWSo/j8EFit7aUMm5lF+lUmCu+IgfnpFD+7QMgLKtxRJ3aGSqgS/GpqcYVGddnODtSarNE/HyGKUFUolLPQ5ybHcouUk0kyfA7XMeSoUA4lBz63Wha8wmXo+NdBRo39qNTMFEwHQYDVR0OBBYEFPtuhrwgGjDFHeUUT4nGsXaZn69KMB8GA1UdIwQYMBaAFPtuhrwgGjDFHeUUT4nGsXaZn69KMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwMDaAAwZQIxAOnozm2CyqRwSSQLls5r+mUHRGRyXHXwYtM4Dcst/VEZdmS9fqvHRCHbjUlO/+HNfgIwMWZ4FmsjD3wnPxONOm9YdVn/PRD7SsPRPbOjwBiE4EBGaHDsLjYAGDSGi7NJnSkA-----END CERTIFICATE-----"), LedgerRoleName: to.Ptr(armconfidentialledger.LedgerRoleNameReader), }}, LedgerType: to.Ptr(armconfidentialledger.LedgerTypePublic), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %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.ConfidentialLedger = armconfidentialledger.ConfidentialLedger{ // Name: to.Ptr("DummyLedgerName"), // Type: to.Ptr("Microsoft.ConfidentialLedger/ledgers"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000001/providers/Microsoft.ConfidentialLedger/ledgers/DummyLedgerName"), // SystemData: &armconfidentialledger.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T00:00:00.1234567Z"); return t}()), // CreatedBy: to.Ptr("ledgerAdmin@contoso.com"), // CreatedByType: to.Ptr(armconfidentialledger.CreatedByType("Admin1")), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-02T00:00:00.1234567Z"); return t}()), // LastModifiedBy: to.Ptr("ledgerAdmin2@outlook.com"), // LastModifiedByType: to.Ptr(armconfidentialledger.CreatedByType("Admin2")), // }, // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // "additionalProps1": to.Ptr("additional properties"), // }, // Properties: &armconfidentialledger.LedgerProperties{ // AADBasedSecurityPrincipals: []*armconfidentialledger.AADBasedSecurityPrincipal{ // { // LedgerRoleName: to.Ptr(armconfidentialledger.LedgerRoleNameAdministrator), // PrincipalID: to.Ptr("34621747-6fc8-4771-a2eb-72f31c461f2e"), // TenantID: to.Ptr("bce123b9-2b7b-4975-8360-5ca0b9b1cd08"), // }}, // CertBasedSecurityPrincipals: []*armconfidentialledger.CertBasedSecurityPrincipal{ // { // Cert: to.Ptr("-----BEGIN CERTIFICATE-----\nMIIDUjCCAjqgAwIBAgIQJ2IrDBawSkiAbkBYmiAopDANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtTeW50aGV0aWNzIExlZGdlciBVc2VyIENlcnQwHhcNMjAwOTIzMjIxODQ2WhcNMjEwOTIzMjIyODQ2WjAmMSQwIgYDVQQDExtTeW50aGV0aWNzIExlZGdlciBVc2VyIENlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCX2s/Eu4q/eQ63N+Ugeg5oAciZua/YCJr41c/696szvSY7Zg1SNJlW88/nbz70+QpO55OmqlEE3QCU+T0Vl/h0Gf//n1PYcoBbTGUnYEmV+fTTHict6rFiEwrGJ62tvcpYgwapInSLyEeUzjki0zhOLJ1OfRnYd1eGnFVMpE5aVjiS8Q5dmTEUyd51EIprGE8RYAW9aeWSwTH7gjHUsRlJnHKcdhaK/v5QKJnNu5bzPFUcpC0ZBcizoMPAtroLAD4B68Jl0z3op18MgZe6lRrVoWuxfqnk5GojuB/Vu8ohAZKoFhQ6NB6r+LL2AUs+Zr7Bt26IkEdR178n9JMEA4gHAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBS/a7PU9iOfOKEyZCp11Oen5VSuuDAdBgNVHQ4EFgQUv2uz1PYjnzihMmQqddTnp+VUrrgwDQYJKoZIhvcNAQELBQADggEBAF5q2fDwnse8egXhfaJCqqM969E9gSacqFmASpoDJPRPEX7gqoO7v1ww7nqRtRDoRiBvo/yNk7jlSAkRN3nRRnZLZZ3MYQdmCr4FGyIqRg4Y94+nja+Du9pDD761rxRktMVPSOaAVM/E5DQvscDlPvlPYe9mkcrLCE4DXYpiMmLT8Tm55LJJq5m07dVDgzAIR1L/hmEcbK0pnLgzciMtMLxGO2udnyyW/UW9WxnjvrrD2JluTHH9mVbb+XQP1oFtlRBfH7aui1ZgWfKvxrdP4zdK9QoWSUvRux3TLsGmHRBjBMtqYDY3y5mB+aNjLelvWpeVb0m2aOSVXynrLwNCAVA=\n-----END CERTIFICATE-----"), // LedgerRoleName: to.Ptr(armconfidentialledger.LedgerRoleNameReader), // }}, // IdentityServiceURI: to.Ptr("https://dummy.accledger.identity.com/DummyLedgerName"), // LedgerInternalNamespace: to.Ptr("dummyNamespace"), // LedgerName: to.Ptr("DummyLedgerName"), // LedgerType: to.Ptr(armconfidentialledger.LedgerTypePublic), // LedgerURI: to.Ptr("https://dummy.accledger.domain.com/DummyLedgerName"), // ProvisioningState: to.Ptr(armconfidentialledger.ProvisioningStateSucceeded), // RunningState: to.Ptr(armconfidentialledger.RunningStateActive), // }, // } }
Output:
func (*LedgerClient) BeginDelete ¶
func (client *LedgerClient) BeginDelete(ctx context.Context, resourceGroupName string, ledgerName string, options *LedgerClientBeginDeleteOptions) (*runtime.Poller[LedgerClientDeleteResponse], error)
BeginDelete - Deletes an existing Confidential Ledger. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-01-26-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- ledgerName - Name of the Confidential Ledger
- options - LedgerClientBeginDeleteOptions contains the optional parameters for the LedgerClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7e295a19c5382a4df2f8101e545fed34186d83bf/specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ConfidentialLedger_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confidentialledger/armconfidentialledger" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armconfidentialledger.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLedgerClient().BeginDelete(ctx, "DummyResourceGroupName", "DummyLedgerName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*LedgerClient) BeginUpdate ¶
func (client *LedgerClient) BeginUpdate(ctx context.Context, resourceGroupName string, ledgerName string, confidentialLedger ConfidentialLedger, options *LedgerClientBeginUpdateOptions) (*runtime.Poller[LedgerClientUpdateResponse], error)
BeginUpdate - Updates properties of Confidential Ledger If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-01-26-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- ledgerName - Name of the Confidential Ledger
- confidentialLedger - Confidential Ledger request body for Updating Ledger
- options - LedgerClientBeginUpdateOptions contains the optional parameters for the LedgerClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7e295a19c5382a4df2f8101e545fed34186d83bf/specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ConfidentialLedger_Update.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confidentialledger/armconfidentialledger" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armconfidentialledger.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLedgerClient().BeginUpdate(ctx, "DummyResourceGroupName", "DummyLedgerName", armconfidentialledger.ConfidentialLedger{ Location: to.Ptr("EastUS"), Tags: map[string]*string{ "additionProps2": to.Ptr("additional property value"), "additionalProps1": to.Ptr("additional properties"), }, Properties: &armconfidentialledger.LedgerProperties{ AADBasedSecurityPrincipals: []*armconfidentialledger.AADBasedSecurityPrincipal{ { LedgerRoleName: to.Ptr(armconfidentialledger.LedgerRoleNameAdministrator), PrincipalID: to.Ptr("34621747-6fc8-4771-a2eb-72f31c461f2e"), TenantID: to.Ptr("bce123b9-2b7b-4975-8360-5ca0b9b1cd08"), }}, CertBasedSecurityPrincipals: []*armconfidentialledger.CertBasedSecurityPrincipal{ { Cert: to.Ptr("-----BEGIN CERTIFICATE-----\nMIIDUjCCAjqgAwIBAgIQJ2IrDBawSkiAbkBYmiAopDANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtTeW50aGV0aWNzIExlZGdlciBVc2VyIENlcnQwHhcNMjAwOTIzMjIxODQ2WhcNMjEwOTIzMjIyODQ2WjAmMSQwIgYDVQQDExtTeW50aGV0aWNzIExlZGdlciBVc2VyIENlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCX2s/Eu4q/eQ63N+Ugeg5oAciZua/YCJr41c/696szvSY7Zg1SNJlW88/nbz70+QpO55OmqlEE3QCU+T0Vl/h0Gf//n1PYcoBbTGUnYEmV+fTTHict6rFiEwrGJ62tvcpYgwapInSLyEeUzjki0zhOLJ1OfRnYd1eGnFVMpE5aVjiS8Q5dmTEUyd51EIprGE8RYAW9aeWSwTH7gjHUsRlJnHKcdhaK/v5QKJnNu5bzPFUcpC0ZBcizoMPAtroLAD4B68Jl0z3op18MgZe6lRrVoWuxfqnk5GojuB/Vu8ohAZKoFhQ6NB6r+LL2AUs+Zr7Bt26IkEdR178n9JMEA4gHAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBS/a7PU9iOfOKEyZCp11Oen5VSuuDAdBgNVHQ4EFgQUv2uz1PYjnzihMmQqddTnp+VUrrgwDQYJKoZIhvcNAQELBQADggEBAF5q2fDwnse8egXhfaJCqqM969E9gSacqFmASpoDJPRPEX7gqoO7v1ww7nqRtRDoRiBvo/yNk7jlSAkRN3nRRnZLZZ3MYQdmCr4FGyIqRg4Y94+nja+Du9pDD761rxRktMVPSOaAVM/E5DQvscDlPvlPYe9mkcrLCE4DXYpiMmLT8Tm55LJJq5m07dVDgzAIR1L/hmEcbK0pnLgzciMtMLxGO2udnyyW/UW9WxnjvrrD2JluTHH9mVbb+XQP1oFtlRBfH7aui1ZgWfKvxrdP4zdK9QoWSUvRux3TLsGmHRBjBMtqYDY3y5mB+aNjLelvWpeVb0m2aOSVXynrLwNCAVA=\n-----END CERTIFICATE-----"), LedgerRoleName: to.Ptr(armconfidentialledger.LedgerRoleNameReader), }}, LedgerType: to.Ptr(armconfidentialledger.LedgerTypePublic), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %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.ConfidentialLedger = armconfidentialledger.ConfidentialLedger{ // Name: to.Ptr("DummyLedgerName"), // Type: to.Ptr("Microsoft.ConfidentialLedger/ledgers"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000001/providers/Microsoft.ConfidentialLedger/ledgers/DummyLedgerName"), // SystemData: &armconfidentialledger.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T00:00:00.1234567Z"); return t}()), // CreatedBy: to.Ptr("ledgerAdmin@contoso.com"), // CreatedByType: to.Ptr(armconfidentialledger.CreatedByType("Admin1")), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-02T00:00:00.1234567Z"); return t}()), // LastModifiedBy: to.Ptr("ledgerAdmin2@outlook.com"), // LastModifiedByType: to.Ptr(armconfidentialledger.CreatedByType("Admin2")), // }, // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // "additionProps2": to.Ptr("additional property value"), // "additionalProps1": to.Ptr("additional properties"), // }, // Properties: &armconfidentialledger.LedgerProperties{ // AADBasedSecurityPrincipals: []*armconfidentialledger.AADBasedSecurityPrincipal{ // { // LedgerRoleName: to.Ptr(armconfidentialledger.LedgerRoleNameAdministrator), // PrincipalID: to.Ptr("34621747-6fc8-4771-a2eb-72f31c461f2e"), // TenantID: to.Ptr("bce123b9-2b7b-4975-8360-5ca0b9b1cd08"), // }}, // CertBasedSecurityPrincipals: []*armconfidentialledger.CertBasedSecurityPrincipal{ // { // Cert: to.Ptr("-----BEGIN CERTIFICATE-----\nMIIDUjCCAjqgAwIBAgIQJ2IrDBawSkiAbkBYmiAopDANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtTeW50aGV0aWNzIExlZGdlciBVc2VyIENlcnQwHhcNMjAwOTIzMjIxODQ2WhcNMjEwOTIzMjIyODQ2WjAmMSQwIgYDVQQDExtTeW50aGV0aWNzIExlZGdlciBVc2VyIENlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCX2s/Eu4q/eQ63N+Ugeg5oAciZua/YCJr41c/696szvSY7Zg1SNJlW88/nbz70+QpO55OmqlEE3QCU+T0Vl/h0Gf//n1PYcoBbTGUnYEmV+fTTHict6rFiEwrGJ62tvcpYgwapInSLyEeUzjki0zhOLJ1OfRnYd1eGnFVMpE5aVjiS8Q5dmTEUyd51EIprGE8RYAW9aeWSwTH7gjHUsRlJnHKcdhaK/v5QKJnNu5bzPFUcpC0ZBcizoMPAtroLAD4B68Jl0z3op18MgZe6lRrVoWuxfqnk5GojuB/Vu8ohAZKoFhQ6NB6r+LL2AUs+Zr7Bt26IkEdR178n9JMEA4gHAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBS/a7PU9iOfOKEyZCp11Oen5VSuuDAdBgNVHQ4EFgQUv2uz1PYjnzihMmQqddTnp+VUrrgwDQYJKoZIhvcNAQELBQADggEBAF5q2fDwnse8egXhfaJCqqM969E9gSacqFmASpoDJPRPEX7gqoO7v1ww7nqRtRDoRiBvo/yNk7jlSAkRN3nRRnZLZZ3MYQdmCr4FGyIqRg4Y94+nja+Du9pDD761rxRktMVPSOaAVM/E5DQvscDlPvlPYe9mkcrLCE4DXYpiMmLT8Tm55LJJq5m07dVDgzAIR1L/hmEcbK0pnLgzciMtMLxGO2udnyyW/UW9WxnjvrrD2JluTHH9mVbb+XQP1oFtlRBfH7aui1ZgWfKvxrdP4zdK9QoWSUvRux3TLsGmHRBjBMtqYDY3y5mB+aNjLelvWpeVb0m2aOSVXynrLwNCAVA=\n-----END CERTIFICATE-----"), // LedgerRoleName: to.Ptr(armconfidentialledger.LedgerRoleNameReader), // }}, // IdentityServiceURI: to.Ptr("https://identity.confidential-ledger.core.azure.com/ledgerIdentity/dummyledgername"), // LedgerInternalNamespace: to.Ptr("dummyNamespace"), // LedgerName: to.Ptr("DummyLedgerName"), // LedgerType: to.Ptr(armconfidentialledger.LedgerTypePublic), // LedgerURI: to.Ptr("https://dummyledgername.confidential-ledger.azure.com"), // ProvisioningState: to.Ptr(armconfidentialledger.ProvisioningStateSucceeded), // RunningState: to.Ptr(armconfidentialledger.RunningStateActive), // }, // } }
Output:
func (*LedgerClient) Get ¶
func (client *LedgerClient) Get(ctx context.Context, resourceGroupName string, ledgerName string, options *LedgerClientGetOptions) (LedgerClientGetResponse, error)
Get - Retrieves the properties of a Confidential Ledger. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-01-26-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- ledgerName - Name of the Confidential Ledger
- options - LedgerClientGetOptions contains the optional parameters for the LedgerClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7e295a19c5382a4df2f8101e545fed34186d83bf/specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ConfidentialLedger_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confidentialledger/armconfidentialledger" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armconfidentialledger.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLedgerClient().Get(ctx, "DummyResourceGroupName", "DummyLedgerName", 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.ConfidentialLedger = armconfidentialledger.ConfidentialLedger{ // Name: to.Ptr("DummyLedgerName"), // Type: to.Ptr("Microsoft.ConfidentialLedger/ledgers"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000001/providers/Microsoft.ConfidentialLedger/ledgers/DummyLedgerName"), // SystemData: &armconfidentialledger.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T00:00:00.1234567Z"); return t}()), // CreatedBy: to.Ptr("ledgerAdmin@contoso.com"), // CreatedByType: to.Ptr(armconfidentialledger.CreatedByType("Admin1")), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-02T00:00:00.1234567Z"); return t}()), // LastModifiedBy: to.Ptr("ledgerAdmin2@outlook.com"), // LastModifiedByType: to.Ptr(armconfidentialledger.CreatedByType("Admin2")), // }, // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // "additionalProps1": to.Ptr("additional properties"), // }, // Properties: &armconfidentialledger.LedgerProperties{ // AADBasedSecurityPrincipals: []*armconfidentialledger.AADBasedSecurityPrincipal{ // { // LedgerRoleName: to.Ptr(armconfidentialledger.LedgerRoleNameAdministrator), // PrincipalID: to.Ptr("34621747-6fc8-4771-a2eb-72f31c461f2e"), // TenantID: to.Ptr("bce123b9-2b7b-4975-8360-5ca0b9b1cd08"), // }}, // IdentityServiceURI: to.Ptr("https://dummy.accledger.identity.com/DummyLedgerName"), // LedgerInternalNamespace: to.Ptr("dummyNamespace"), // LedgerName: to.Ptr("DummyLedgerName"), // LedgerType: to.Ptr(armconfidentialledger.LedgerTypePublic), // LedgerURI: to.Ptr("https://dummy.accledger.domain.com/DummyLedgerName"), // ProvisioningState: to.Ptr(armconfidentialledger.ProvisioningStateSucceeded), // RunningState: to.Ptr(armconfidentialledger.RunningStateActive), // }, // } }
Output:
func (*LedgerClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *LedgerClient) NewListByResourceGroupPager(resourceGroupName string, options *LedgerClientListByResourceGroupOptions) *runtime.Pager[LedgerClientListByResourceGroupResponse]
NewListByResourceGroupPager - Retrieves the properties of all Confidential Ledgers.
Generated from API version 2023-01-26-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - LedgerClientListByResourceGroupOptions contains the optional parameters for the LedgerClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7e295a19c5382a4df2f8101e545fed34186d83bf/specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ConfidentialLedger_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confidentialledger/armconfidentialledger" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armconfidentialledger.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLedgerClient().NewListByResourceGroupPager("DummyResourceGroupName", &armconfidentialledger.LedgerClientListByResourceGroupOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.List = armconfidentialledger.List{ // Value: []*armconfidentialledger.ConfidentialLedger{ // { // Name: to.Ptr("DummyLedgerName"), // Type: to.Ptr("Microsoft.ConfidentialLedger/ledgers"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000001/providers/Microsoft.ConfidentialLedger/ledgers/DummyLedgerName"), // SystemData: &armconfidentialledger.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T00:00:00.1234567Z"); return t}()), // CreatedBy: to.Ptr("ledgerAdmin@contoso.com"), // CreatedByType: to.Ptr(armconfidentialledger.CreatedByType("Admin1")), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-02T00:00:00.1234567Z"); return t}()), // LastModifiedBy: to.Ptr("ledgerAdmin2@outlook.com"), // LastModifiedByType: to.Ptr(armconfidentialledger.CreatedByType("Admin2")), // }, // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // "additionalProps1": to.Ptr("additional properties"), // }, // Properties: &armconfidentialledger.LedgerProperties{ // AADBasedSecurityPrincipals: []*armconfidentialledger.AADBasedSecurityPrincipal{ // { // LedgerRoleName: to.Ptr(armconfidentialledger.LedgerRoleNameAdministrator), // PrincipalID: to.Ptr("34621747-6fc8-4771-a2eb-72f31c461f2e"), // TenantID: to.Ptr("bce123b9-2b7b-4975-8360-5ca0b9b1cd08"), // }}, // IdentityServiceURI: to.Ptr("https://dummy.accledger.identity.com/DummyLedgerName"), // LedgerInternalNamespace: to.Ptr("dummyNamespace"), // LedgerName: to.Ptr("DummyLedgerName"), // LedgerType: to.Ptr(armconfidentialledger.LedgerTypePublic), // LedgerURI: to.Ptr("https://dummy.accledger.domain.com/DummyLedgerName"), // ProvisioningState: to.Ptr(armconfidentialledger.ProvisioningStateSucceeded), // RunningState: to.Ptr(armconfidentialledger.RunningStateActive), // }, // }}, // } } }
Output:
func (*LedgerClient) NewListBySubscriptionPager ¶ added in v0.4.0
func (client *LedgerClient) NewListBySubscriptionPager(options *LedgerClientListBySubscriptionOptions) *runtime.Pager[LedgerClientListBySubscriptionResponse]
NewListBySubscriptionPager - Retrieves the properties of all Confidential Ledgers.
Generated from API version 2023-01-26-preview
- options - LedgerClientListBySubscriptionOptions contains the optional parameters for the LedgerClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7e295a19c5382a4df2f8101e545fed34186d83bf/specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ConfidentialLedger_ListBySub.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confidentialledger/armconfidentialledger" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armconfidentialledger.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLedgerClient().NewListBySubscriptionPager(&armconfidentialledger.LedgerClientListBySubscriptionOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.List = armconfidentialledger.List{ // Value: []*armconfidentialledger.ConfidentialLedger{ // { // Name: to.Ptr("DummyLedgerName"), // Type: to.Ptr("Microsoft.ConfidentialLedger/ledgers"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000001/providers/Microsoft.ConfidentialLedger/ledgers/DummyLedgerName"), // SystemData: &armconfidentialledger.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T00:00:00.1234567Z"); return t}()), // CreatedBy: to.Ptr("ledgerAdmin@contoso.com"), // CreatedByType: to.Ptr(armconfidentialledger.CreatedByType("Admin1")), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-02T00:00:00.1234567Z"); return t}()), // LastModifiedBy: to.Ptr("ledgerAdmin2@outlook.com"), // LastModifiedByType: to.Ptr(armconfidentialledger.CreatedByType("Admin2")), // }, // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // "additionalProps1": to.Ptr("additional properties"), // }, // Properties: &armconfidentialledger.LedgerProperties{ // CertBasedSecurityPrincipals: []*armconfidentialledger.CertBasedSecurityPrincipal{ // { // Cert: to.Ptr("-----BEGIN CERTIFICATE-----\nMIIDUjCCAjqgAwIBAgIQJ2IrDBawSkiAbkBYmiAopDANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtTeW50aGV0aWNzIExlZGdlciBVc2VyIENlcnQwHhcNMjAwOTIzMjIxODQ2WhcNMjEwOTIzMjIyODQ2WjAmMSQwIgYDVQQDExtTeW50aGV0aWNzIExlZGdlciBVc2VyIENlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCX2s/Eu4q/eQ63N+Ugeg5oAciZua/YCJr41c/696szvSY7Zg1SNJlW88/nbz70+QpO55OmqlEE3QCU+T0Vl/h0Gf//n1PYcoBbTGUnYEmV+fTTHict6rFiEwrGJ62tvcpYgwapInSLyEeUzjki0zhOLJ1OfRnYd1eGnFVMpE5aVjiS8Q5dmTEUyd51EIprGE8RYAW9aeWSwTH7gjHUsRlJnHKcdhaK/v5QKJnNu5bzPFUcpC0ZBcizoMPAtroLAD4B68Jl0z3op18MgZe6lRrVoWuxfqnk5GojuB/Vu8ohAZKoFhQ6NB6r+LL2AUs+Zr7Bt26IkEdR178n9JMEA4gHAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBS/a7PU9iOfOKEyZCp11Oen5VSuuDAdBgNVHQ4EFgQUv2uz1PYjnzihMmQqddTnp+VUrrgwDQYJKoZIhvcNAQELBQADggEBAF5q2fDwnse8egXhfaJCqqM969E9gSacqFmASpoDJPRPEX7gqoO7v1ww7nqRtRDoRiBvo/yNk7jlSAkRN3nRRnZLZZ3MYQdmCr4FGyIqRg4Y94+nja+Du9pDD761rxRktMVPSOaAVM/E5DQvscDlPvlPYe9mkcrLCE4DXYpiMmLT8Tm55LJJq5m07dVDgzAIR1L/hmEcbK0pnLgzciMtMLxGO2udnyyW/UW9WxnjvrrD2JluTHH9mVbb+XQP1oFtlRBfH7aui1ZgWfKvxrdP4zdK9QoWSUvRux3TLsGmHRBjBMtqYDY3y5mB+aNjLelvWpeVb0m2aOSVXynrLwNCAVA=\n-----END CERTIFICATE-----"), // LedgerRoleName: to.Ptr(armconfidentialledger.LedgerRoleNameReader), // }}, // IdentityServiceURI: to.Ptr("https://dummy.accledger.identity.com/DummyLedgerName"), // LedgerInternalNamespace: to.Ptr("dummyNamespace"), // LedgerName: to.Ptr("DummyLedgerName"), // LedgerType: to.Ptr(armconfidentialledger.LedgerTypePublic), // LedgerURI: to.Ptr("https://dummy.accledger.domain.com/DummyLedgerName"), // ProvisioningState: to.Ptr(armconfidentialledger.ProvisioningStateSucceeded), // RunningState: to.Ptr(armconfidentialledger.RunningStateActive), // }, // }}, // } } }
Output:
type LedgerClientBeginCreateOptions ¶ added in v0.2.0
type LedgerClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LedgerClientBeginCreateOptions contains the optional parameters for the LedgerClient.BeginCreate method.
type LedgerClientBeginDeleteOptions ¶ added in v0.2.0
type LedgerClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LedgerClientBeginDeleteOptions contains the optional parameters for the LedgerClient.BeginDelete method.
type LedgerClientBeginUpdateOptions ¶ added in v0.2.0
type LedgerClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LedgerClientBeginUpdateOptions contains the optional parameters for the LedgerClient.BeginUpdate method.
type LedgerClientCreateResponse ¶ added in v0.2.0
type LedgerClientCreateResponse struct {
ConfidentialLedger
}
LedgerClientCreateResponse contains the response from method LedgerClient.BeginCreate.
type LedgerClientDeleteResponse ¶ added in v0.2.0
type LedgerClientDeleteResponse struct { }
LedgerClientDeleteResponse contains the response from method LedgerClient.BeginDelete.
type LedgerClientGetOptions ¶ added in v0.2.0
type LedgerClientGetOptions struct { }
LedgerClientGetOptions contains the optional parameters for the LedgerClient.Get method.
type LedgerClientGetResponse ¶ added in v0.2.0
type LedgerClientGetResponse struct {
ConfidentialLedger
}
LedgerClientGetResponse contains the response from method LedgerClient.Get.
type LedgerClientListByResourceGroupOptions ¶ added in v0.2.0
type LedgerClientListByResourceGroupOptions struct { // The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public' Filter *string }
LedgerClientListByResourceGroupOptions contains the optional parameters for the LedgerClient.NewListByResourceGroupPager method.
type LedgerClientListByResourceGroupResponse ¶ added in v0.2.0
type LedgerClientListByResourceGroupResponse struct {
List
}
LedgerClientListByResourceGroupResponse contains the response from method LedgerClient.NewListByResourceGroupPager.
type LedgerClientListBySubscriptionOptions ¶ added in v0.2.0
type LedgerClientListBySubscriptionOptions struct { // The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public' Filter *string }
LedgerClientListBySubscriptionOptions contains the optional parameters for the LedgerClient.NewListBySubscriptionPager method.
type LedgerClientListBySubscriptionResponse ¶ added in v0.2.0
type LedgerClientListBySubscriptionResponse struct {
List
}
LedgerClientListBySubscriptionResponse contains the response from method LedgerClient.NewListBySubscriptionPager.
type LedgerClientUpdateResponse ¶ added in v0.2.0
type LedgerClientUpdateResponse struct {
ConfidentialLedger
}
LedgerClientUpdateResponse contains the response from method LedgerClient.BeginUpdate.
type LedgerProperties ¶
type LedgerProperties struct { // Array of all AAD based Security Principals. AADBasedSecurityPrincipals []*AADBasedSecurityPrincipal // Array of all cert based Security Principals. CertBasedSecurityPrincipals []*CertBasedSecurityPrincipal // Type of Confidential Ledger LedgerType *LedgerType // Object representing RunningState for Ledger. RunningState *RunningState // READ-ONLY; Endpoint for accessing network identity. IdentityServiceURI *string // READ-ONLY; Internal namespace for the Ledger LedgerInternalNamespace *string // READ-ONLY; Unique name for the Confidential Ledger. LedgerName *string // READ-ONLY; Endpoint for calling Ledger Service. LedgerURI *string // READ-ONLY; Provisioning state of Ledger Resource ProvisioningState *ProvisioningState }
LedgerProperties - Additional Confidential Ledger properties.
func (LedgerProperties) MarshalJSON ¶
func (l LedgerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LedgerProperties.
func (*LedgerProperties) UnmarshalJSON ¶ added in v1.1.0
func (l *LedgerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LedgerProperties.
type LedgerRoleName ¶
type LedgerRoleName string
LedgerRoleName - LedgerRole associated with the Security Principal of Ledger
const ( LedgerRoleNameAdministrator LedgerRoleName = "Administrator" LedgerRoleNameContributor LedgerRoleName = "Contributor" LedgerRoleNameReader LedgerRoleName = "Reader" )
func PossibleLedgerRoleNameValues ¶
func PossibleLedgerRoleNameValues() []LedgerRoleName
PossibleLedgerRoleNameValues returns the possible values for the LedgerRoleName const type.
type LedgerType ¶
type LedgerType string
LedgerType - Type of the ledger. Private means transaction data is encrypted.
const ( LedgerTypePrivate LedgerType = "Private" LedgerTypePublic LedgerType = "Public" LedgerTypeUnknown LedgerType = "Unknown" )
func PossibleLedgerTypeValues ¶
func PossibleLedgerTypeValues() []LedgerType
PossibleLedgerTypeValues returns the possible values for the LedgerType const type.
type List ¶ added in v0.2.0
type List struct { // The URL the client should use to fetch the next page (per server side paging). NextLink *string // List of Confidential Ledgers Value []*ConfidentialLedger }
List - Object that includes an array of Confidential Ledgers and a possible link for next set.
func (List) MarshalJSON ¶ added in v0.2.0
MarshalJSON implements the json.Marshaller interface for type List.
func (*List) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type List.
type ManagedCCF ¶
type ManagedCCF struct { // REQUIRED; The geo-location where the resource lives Location *string // Properties of Managed CCF Resource. Properties *ManagedCCFProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ManagedCCF - Managed CCF. Contains the properties of Managed CCF Resource.
func (ManagedCCF) MarshalJSON ¶
func (m ManagedCCF) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedCCF.
func (*ManagedCCF) UnmarshalJSON ¶
func (m *ManagedCCF) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCCF.
type ManagedCCFClient ¶
type ManagedCCFClient struct {
// contains filtered or unexported fields
}
ManagedCCFClient contains the methods for the ManagedCCF group. Don't use this type directly, use NewManagedCCFClient() instead.
func NewManagedCCFClient ¶
func NewManagedCCFClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedCCFClient, error)
NewManagedCCFClient creates a new instance of ManagedCCFClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedCCFClient) BeginCreate ¶
func (client *ManagedCCFClient) BeginCreate(ctx context.Context, resourceGroupName string, appName string, managedCCF ManagedCCF, options *ManagedCCFClientBeginCreateOptions) (*runtime.Poller[ManagedCCFClientCreateResponse], error)
BeginCreate - Creates a Managed CCF with the specified Managed CCF parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-01-26-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- appName - Name of the Managed CCF
- managedCCF - Managed CCF Create Request Body
- options - ManagedCCFClientBeginCreateOptions contains the optional parameters for the ManagedCCFClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7e295a19c5382a4df2f8101e545fed34186d83bf/specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ManagedCCF_Create.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confidentialledger/armconfidentialledger" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armconfidentialledger.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedCCFClient().BeginCreate(ctx, "DummyResourceGroupName", "DummyMccfAppName", armconfidentialledger.ManagedCCF{ Location: to.Ptr("EastUS"), Tags: map[string]*string{ "additionalProps1": to.Ptr("additional properties"), }, Properties: &armconfidentialledger.ManagedCCFProperties{ DeploymentType: &armconfidentialledger.DeploymentType{ AppSourceURI: to.Ptr("https://myaccount.blob.core.windows.net/storage/mccfsource?sv=2022-02-11%st=2022-03-11"), LanguageRuntime: to.Ptr(armconfidentialledger.LanguageRuntimeCPP), }, MemberIdentityCertificates: []*armconfidentialledger.MemberIdentityCertificate{ { Certificate: to.Ptr("-----BEGIN CERTIFICATE-----MIIBsjCCATigAwIBAgIUZWIbyG79TniQLd2UxJuU74tqrKcwCgYIKoZIzj0EAwMwEDEOMAwGA1UEAwwFdXNlcjAwHhcNMjEwMzE2MTgwNjExWhcNMjIwMzE2MTgwNjExWjAQMQ4wDAYDVQQDDAV1c2VyMDB2MBAGByqGSM49AgEGBSuBBAAiA2IABBiWSo/j8EFit7aUMm5lF+lUmCu+IgfnpFD+7QMgLKtxRJ3aGSqgS/GpqcYVGddnODtSarNE/HyGKUFUolLPQ5ybHcouUk0kyfA7XMeSoUA4lBz63Wha8wmXo+NdBRo39qNTMFEwHQYDVR0OBBYEFPtuhrwgGjDFHeUUT4nGsXaZn69KMB8GA1UdIwQYMBaAFPtuhrwgGjDFHeUUT4nGsXaZn69KMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwMDaAAwZQIxAOnozm2CyqRwSSQLls5r+mUHRGRyXHXwYtM4Dcst/VEZdmS9fqvHRCHbjUlO/+HNfgIwMWZ4FmsjD3wnPxONOm9YdVn/PRD7SsPRPbOjwBiE4EBGaHDsLjYAGDSGi7NJnSkA-----END CERTIFICATE-----"), Encryptionkey: to.Ptr("ledgerencryptionkey"), Tags: map[string]any{ "additionalProps1": "additional properties", }, }}, NodeCount: to.Ptr[int32](5), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %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.ManagedCCF = armconfidentialledger.ManagedCCF{ // Name: to.Ptr("DummyLedgerName"), // Type: to.Ptr("Microsoft.ConfidentialLedger/ManagedCCFs"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000001/providers/Microsoft.ConfidentialLedger/ledgers/DummyLedgerName"), // SystemData: &armconfidentialledger.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T00:00:00.1234567Z"); return t}()), // CreatedBy: to.Ptr("ledgerAdmin@contoso.com"), // CreatedByType: to.Ptr(armconfidentialledger.CreatedByType("Admin1")), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-02T00:00:00.1234567Z"); return t}()), // LastModifiedBy: to.Ptr("ledgerAdmin2@outlook.com"), // LastModifiedByType: to.Ptr(armconfidentialledger.CreatedByType("Admin2")), // }, // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // "additionalProps1": to.Ptr("additional properties"), // }, // Properties: &armconfidentialledger.ManagedCCFProperties{ // AppName: to.Ptr("DummyMccfAppName"), // AppURI: to.Ptr("https://dummy.accledger.domain.com/DummyLedgerName"), // DeploymentType: &armconfidentialledger.DeploymentType{ // AppSourceURI: to.Ptr("https://myaccount.blob.core.windows.net/storage/mccfsource?sv=2022-02-11%st=2022-03-11"), // LanguageRuntime: to.Ptr(armconfidentialledger.LanguageRuntimeCPP), // }, // IdentityServiceURI: to.Ptr("https://dummy.accledger.identity.com/DummyLedgerName"), // MemberIdentityCertificates: []*armconfidentialledger.MemberIdentityCertificate{ // { // Certificate: to.Ptr("-----BEGIN CERTIFICATE-----MIIBsjCCATigAwIBAgIUZWIbyG79TniQLd2UxJuU74tqrKcwCgYIKoZIzj0EAwMwEDEOMAwGA1UEAwwFdXNlcjAwHhcNMjEwMzE2MTgwNjExWhcNMjIwMzE2MTgwNjExWjAQMQ4wDAYDVQQDDAV1c2VyMDB2MBAGByqGSM49AgEGBSuBBAAiA2IABBiWSo/j8EFit7aUMm5lF+lUmCu+IgfnpFD+7QMgLKtxRJ3aGSqgS/GpqcYVGddnODtSarNE/HyGKUFUolLPQ5ybHcouUk0kyfA7XMeSoUA4lBz63Wha8wmXo+NdBRo39qNTMFEwHQYDVR0OBBYEFPtuhrwgGjDFHeUUT4nGsXaZn69KMB8GA1UdIwQYMBaAFPtuhrwgGjDFHeUUT4nGsXaZn69KMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwMDaAAwZQIxAOnozm2CyqRwSSQLls5r+mUHRGRyXHXwYtM4Dcst/VEZdmS9fqvHRCHbjUlO/+HNfgIwMWZ4FmsjD3wnPxONOm9YdVn/PRD7SsPRPbOjwBiE4EBGaHDsLjYAGDSGi7NJnSkA-----END CERTIFICATE-----"), // Encryptionkey: to.Ptr("ledgerencryptionkey"), // Tags: map[string]any{ // "additionalProps1": "additional properties", // }, // }}, // ProvisioningState: to.Ptr(armconfidentialledger.ProvisioningStateSucceeded), // }, // } }
Output:
func (*ManagedCCFClient) BeginDelete ¶
func (client *ManagedCCFClient) BeginDelete(ctx context.Context, resourceGroupName string, appName string, options *ManagedCCFClientBeginDeleteOptions) (*runtime.Poller[ManagedCCFClientDeleteResponse], error)
BeginDelete - Deletes an existing Managed CCF. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-01-26-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- appName - Name of the Managed CCF
- options - ManagedCCFClientBeginDeleteOptions contains the optional parameters for the ManagedCCFClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7e295a19c5382a4df2f8101e545fed34186d83bf/specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ManagedCCF_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confidentialledger/armconfidentialledger" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armconfidentialledger.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedCCFClient().BeginDelete(ctx, "DummyResourceGroupName", "DummyMccfAppName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ManagedCCFClient) BeginUpdate ¶
func (client *ManagedCCFClient) BeginUpdate(ctx context.Context, resourceGroupName string, appName string, managedCCF ManagedCCF, options *ManagedCCFClientBeginUpdateOptions) (*runtime.Poller[ManagedCCFClientUpdateResponse], error)
BeginUpdate - Updates properties of Managed CCF If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-01-26-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- appName - Name of the Managed CCF
- managedCCF - Request body for Updating Managed CCF App
- options - ManagedCCFClientBeginUpdateOptions contains the optional parameters for the ManagedCCFClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7e295a19c5382a4df2f8101e545fed34186d83bf/specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ManagedCCF_Update.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confidentialledger/armconfidentialledger" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armconfidentialledger.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedCCFClient().BeginUpdate(ctx, "DummyResourceGroupName", "DummyMccfAppName", armconfidentialledger.ManagedCCF{ Location: to.Ptr("EastUS"), Tags: map[string]*string{ "additionalProps1": to.Ptr("additional properties"), }, Properties: &armconfidentialledger.ManagedCCFProperties{ DeploymentType: &armconfidentialledger.DeploymentType{ AppSourceURI: to.Ptr("https://myaccount.blob.core.windows.net/storage/mccfsource?sv=2022-02-11%st=2022-03-11"), LanguageRuntime: to.Ptr(armconfidentialledger.LanguageRuntimeCPP), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ManagedCCFClient) Get ¶
func (client *ManagedCCFClient) Get(ctx context.Context, resourceGroupName string, appName string, options *ManagedCCFClientGetOptions) (ManagedCCFClientGetResponse, error)
Get - Retrieves the properties of a Managed CCF app. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-01-26-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- appName - Name of the Managed CCF
- options - ManagedCCFClientGetOptions contains the optional parameters for the ManagedCCFClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7e295a19c5382a4df2f8101e545fed34186d83bf/specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ManagedCCF_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confidentialledger/armconfidentialledger" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armconfidentialledger.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedCCFClient().Get(ctx, "DummyResourceGroupName", "DummyMccfAppName", 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.ManagedCCF = armconfidentialledger.ManagedCCF{ // Name: to.Ptr("DummyMccfAppName"), // Type: to.Ptr("Microsoft.ConfidentialLedger/ManagedCCFs"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000001/providers/Microsoft.ConfidentialLedger/ManagedCCFs/DummyLedgerName"), // SystemData: &armconfidentialledger.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T00:00:00.1234567Z"); return t}()), // CreatedBy: to.Ptr("ledgerAdmin@contoso.com"), // CreatedByType: to.Ptr(armconfidentialledger.CreatedByType("Admin1")), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-02T00:00:00.1234567Z"); return t}()), // LastModifiedBy: to.Ptr("ledgerAdmin2@outlook.com"), // LastModifiedByType: to.Ptr(armconfidentialledger.CreatedByType("Admin2")), // }, // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // "additionalProps1": to.Ptr("additional properties"), // }, // Properties: &armconfidentialledger.ManagedCCFProperties{ // AppName: to.Ptr("DummyMccfAppName"), // AppURI: to.Ptr("https://dummy.accledger.domain.com/DummyLedgerName"), // DeploymentType: &armconfidentialledger.DeploymentType{ // AppSourceURI: to.Ptr("https://myaccount.blob.core.windows.net/storage/mccfsource?sv=2022-02-11%st=2022-03-11"), // LanguageRuntime: to.Ptr(armconfidentialledger.LanguageRuntimeCPP), // }, // IdentityServiceURI: to.Ptr("https://dummy.accledger.identity.com/DummyLedgerName"), // MemberIdentityCertificates: []*armconfidentialledger.MemberIdentityCertificate{ // { // Certificate: to.Ptr("-----BEGIN CERTIFICATE-----MIIBsjCCATigAwIBAgIUZWIbyG79TniQLd2UxJuU74tqrKcwCgYIKoZIzj0EAwMwEDEOMAwGA1UEAwwFdXNlcjAwHhcNMjEwMzE2MTgwNjExWhcNMjIwMzE2MTgwNjExWjAQMQ4wDAYDVQQDDAV1c2VyMDB2MBAGByqGSM49AgEGBSuBBAAiA2IABBiWSo/j8EFit7aUMm5lF+lUmCu+IgfnpFD+7QMgLKtxRJ3aGSqgS/GpqcYVGddnODtSarNE/HyGKUFUolLPQ5ybHcouUk0kyfA7XMeSoUA4lBz63Wha8wmXo+NdBRo39qNTMFEwHQYDVR0OBBYEFPtuhrwgGjDFHeUUT4nGsXaZn69KMB8GA1UdIwQYMBaAFPtuhrwgGjDFHeUUT4nGsXaZn69KMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwMDaAAwZQIxAOnozm2CyqRwSSQLls5r+mUHRGRyXHXwYtM4Dcst/VEZdmS9fqvHRCHbjUlO/+HNfgIwMWZ4FmsjD3wnPxONOm9YdVn/PRD7SsPRPbOjwBiE4EBGaHDsLjYAGDSGi7NJnSkA-----END CERTIFICATE-----"), // Encryptionkey: to.Ptr("ledgerencryptionkey"), // Tags: map[string]any{ // "additionalProps1": "additional properties", // }, // }}, // }, // } }
Output:
func (*ManagedCCFClient) NewListByResourceGroupPager ¶
func (client *ManagedCCFClient) NewListByResourceGroupPager(resourceGroupName string, options *ManagedCCFClientListByResourceGroupOptions) *runtime.Pager[ManagedCCFClientListByResourceGroupResponse]
NewListByResourceGroupPager - Retrieves the properties of all Managed CCF apps.
Generated from API version 2023-01-26-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - ManagedCCFClientListByResourceGroupOptions contains the optional parameters for the ManagedCCFClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7e295a19c5382a4df2f8101e545fed34186d83bf/specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ManagedCCF_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confidentialledger/armconfidentialledger" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armconfidentialledger.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedCCFClient().NewListByResourceGroupPager("DummyResourceGroupName", &armconfidentialledger.ManagedCCFClientListByResourceGroupOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedCCFList = armconfidentialledger.ManagedCCFList{ // Value: []*armconfidentialledger.ManagedCCF{ // { // Name: to.Ptr("DummyLedgerName"), // Type: to.Ptr("Microsoft.ConfidentialLedger/ManagedCCFs"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000001/providers/Microsoft.ConfidentialLedger/ManagedCCFs/DummyLedgerName"), // SystemData: &armconfidentialledger.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T00:00:00.1234567Z"); return t}()), // CreatedBy: to.Ptr("ledgerAdmin@contoso.com"), // CreatedByType: to.Ptr(armconfidentialledger.CreatedByType("Admin1")), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-02T00:00:00.1234567Z"); return t}()), // LastModifiedBy: to.Ptr("ledgerAdmin2@outlook.com"), // LastModifiedByType: to.Ptr(armconfidentialledger.CreatedByType("Admin2")), // }, // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // "additionalProps1": to.Ptr("additional properties"), // }, // Properties: &armconfidentialledger.ManagedCCFProperties{ // AppName: to.Ptr("DummyMccfAppName"), // AppURI: to.Ptr("https://dummy.accledger.domain.com/DummyLedgerName"), // DeploymentType: &armconfidentialledger.DeploymentType{ // AppSourceURI: to.Ptr("https://myaccount.blob.core.windows.net/storage/mccfsource?sv=2022-02-11%st=2022-03-11"), // LanguageRuntime: to.Ptr(armconfidentialledger.LanguageRuntimeCPP), // }, // IdentityServiceURI: to.Ptr("https://dummy.accledger.identity.com/DummyLedgerName"), // MemberIdentityCertificates: []*armconfidentialledger.MemberIdentityCertificate{ // { // Certificate: to.Ptr("-----BEGIN CERTIFICATE-----MIIBsjCCATigAwIBAgIUZWIbyG79TniQLd2UxJuU74tqrKcwCgYIKoZIzj0EAwMwEDEOMAwGA1UEAwwFdXNlcjAwHhcNMjEwMzE2MTgwNjExWhcNMjIwMzE2MTgwNjExWjAQMQ4wDAYDVQQDDAV1c2VyMDB2MBAGByqGSM49AgEGBSuBBAAiA2IABBiWSo/j8EFit7aUMm5lF+lUmCu+IgfnpFD+7QMgLKtxRJ3aGSqgS/GpqcYVGddnODtSarNE/HyGKUFUolLPQ5ybHcouUk0kyfA7XMeSoUA4lBz63Wha8wmXo+NdBRo39qNTMFEwHQYDVR0OBBYEFPtuhrwgGjDFHeUUT4nGsXaZn69KMB8GA1UdIwQYMBaAFPtuhrwgGjDFHeUUT4nGsXaZn69KMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwMDaAAwZQIxAOnozm2CyqRwSSQLls5r+mUHRGRyXHXwYtM4Dcst/VEZdmS9fqvHRCHbjUlO/+HNfgIwMWZ4FmsjD3wnPxONOm9YdVn/PRD7SsPRPbOjwBiE4EBGaHDsLjYAGDSGi7NJnSkA-----END CERTIFICATE-----"), // Encryptionkey: to.Ptr("ledgerencryptionkey"), // Tags: map[string]any{ // "additionalProps1": "additional properties", // }, // }}, // ProvisioningState: to.Ptr(armconfidentialledger.ProvisioningStateSucceeded), // }, // }}, // } } }
Output:
func (*ManagedCCFClient) NewListBySubscriptionPager ¶
func (client *ManagedCCFClient) NewListBySubscriptionPager(options *ManagedCCFClientListBySubscriptionOptions) *runtime.Pager[ManagedCCFClientListBySubscriptionResponse]
NewListBySubscriptionPager - Retrieves the properties of all Managed CCF.
Generated from API version 2023-01-26-preview
- options - ManagedCCFClientListBySubscriptionOptions contains the optional parameters for the ManagedCCFClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7e295a19c5382a4df2f8101e545fed34186d83bf/specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ManagedCCF_ListBySub.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confidentialledger/armconfidentialledger" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armconfidentialledger.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedCCFClient().NewListBySubscriptionPager(&armconfidentialledger.ManagedCCFClientListBySubscriptionOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedCCFList = armconfidentialledger.ManagedCCFList{ // Value: []*armconfidentialledger.ManagedCCF{ // { // Name: to.Ptr("DummyLedgerName"), // Type: to.Ptr("Microsoft.ConfidentialLedger/ManagedCCFs"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000001/providers/Microsoft.ConfidentialLedger/ManagedCCFs/DummyLedgerName"), // SystemData: &armconfidentialledger.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T00:00:00.1234567Z"); return t}()), // CreatedBy: to.Ptr("ledgerAdmin@contoso.com"), // CreatedByType: to.Ptr(armconfidentialledger.CreatedByType("Admin1")), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-02T00:00:00.1234567Z"); return t}()), // LastModifiedBy: to.Ptr("ledgerAdmin2@outlook.com"), // LastModifiedByType: to.Ptr(armconfidentialledger.CreatedByType("Admin2")), // }, // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // "additionalProps1": to.Ptr("additional properties"), // }, // Properties: &armconfidentialledger.ManagedCCFProperties{ // AppName: to.Ptr("DummyMccfAppName"), // AppURI: to.Ptr("https://dummy.accledger.domain.com/DummyLedgerName"), // DeploymentType: &armconfidentialledger.DeploymentType{ // AppSourceURI: to.Ptr("https://myaccount.blob.core.windows.net/storage/mccfsource?sv=2022-02-11%st=2022-03-11"), // LanguageRuntime: to.Ptr(armconfidentialledger.LanguageRuntimeCPP), // }, // IdentityServiceURI: to.Ptr("https://dummy.accledger.identity.com/DummyLedgerName"), // MemberIdentityCertificates: []*armconfidentialledger.MemberIdentityCertificate{ // { // Certificate: to.Ptr("-----BEGIN CERTIFICATE-----MIIBsjCCATigAwIBAgIUZWIbyG79TniQLd2UxJuU74tqrKcwCgYIKoZIzj0EAwMwEDEOMAwGA1UEAwwFdXNlcjAwHhcNMjEwMzE2MTgwNjExWhcNMjIwMzE2MTgwNjExWjAQMQ4wDAYDVQQDDAV1c2VyMDB2MBAGByqGSM49AgEGBSuBBAAiA2IABBiWSo/j8EFit7aUMm5lF+lUmCu+IgfnpFD+7QMgLKtxRJ3aGSqgS/GpqcYVGddnODtSarNE/HyGKUFUolLPQ5ybHcouUk0kyfA7XMeSoUA4lBz63Wha8wmXo+NdBRo39qNTMFEwHQYDVR0OBBYEFPtuhrwgGjDFHeUUT4nGsXaZn69KMB8GA1UdIwQYMBaAFPtuhrwgGjDFHeUUT4nGsXaZn69KMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwMDaAAwZQIxAOnozm2CyqRwSSQLls5r+mUHRGRyXHXwYtM4Dcst/VEZdmS9fqvHRCHbjUlO/+HNfgIwMWZ4FmsjD3wnPxONOm9YdVn/PRD7SsPRPbOjwBiE4EBGaHDsLjYAGDSGi7NJnSkA-----END CERTIFICATE-----"), // Encryptionkey: to.Ptr("ledgerencryptionkey"), // Tags: map[string]any{ // "additionalProps1": "additional properties", // }, // }}, // ProvisioningState: to.Ptr(armconfidentialledger.ProvisioningStateSucceeded), // }, // }}, // } } }
Output:
type ManagedCCFClientBeginCreateOptions ¶
type ManagedCCFClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedCCFClientBeginCreateOptions contains the optional parameters for the ManagedCCFClient.BeginCreate method.
type ManagedCCFClientBeginDeleteOptions ¶
type ManagedCCFClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedCCFClientBeginDeleteOptions contains the optional parameters for the ManagedCCFClient.BeginDelete method.
type ManagedCCFClientBeginUpdateOptions ¶
type ManagedCCFClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedCCFClientBeginUpdateOptions contains the optional parameters for the ManagedCCFClient.BeginUpdate method.
type ManagedCCFClientCreateResponse ¶
type ManagedCCFClientCreateResponse struct {
ManagedCCF
}
ManagedCCFClientCreateResponse contains the response from method ManagedCCFClient.BeginCreate.
type ManagedCCFClientDeleteResponse ¶
type ManagedCCFClientDeleteResponse struct { }
ManagedCCFClientDeleteResponse contains the response from method ManagedCCFClient.BeginDelete.
type ManagedCCFClientGetOptions ¶
type ManagedCCFClientGetOptions struct { }
ManagedCCFClientGetOptions contains the optional parameters for the ManagedCCFClient.Get method.
type ManagedCCFClientGetResponse ¶
type ManagedCCFClientGetResponse struct {
ManagedCCF
}
ManagedCCFClientGetResponse contains the response from method ManagedCCFClient.Get.
type ManagedCCFClientListByResourceGroupOptions ¶
type ManagedCCFClientListByResourceGroupOptions struct { // The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public' Filter *string }
ManagedCCFClientListByResourceGroupOptions contains the optional parameters for the ManagedCCFClient.NewListByResourceGroupPager method.
type ManagedCCFClientListByResourceGroupResponse ¶
type ManagedCCFClientListByResourceGroupResponse struct {
ManagedCCFList
}
ManagedCCFClientListByResourceGroupResponse contains the response from method ManagedCCFClient.NewListByResourceGroupPager.
type ManagedCCFClientListBySubscriptionOptions ¶
type ManagedCCFClientListBySubscriptionOptions struct { // The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public' Filter *string }
ManagedCCFClientListBySubscriptionOptions contains the optional parameters for the ManagedCCFClient.NewListBySubscriptionPager method.
type ManagedCCFClientListBySubscriptionResponse ¶
type ManagedCCFClientListBySubscriptionResponse struct {
ManagedCCFList
}
ManagedCCFClientListBySubscriptionResponse contains the response from method ManagedCCFClient.NewListBySubscriptionPager.
type ManagedCCFClientUpdateResponse ¶
type ManagedCCFClientUpdateResponse struct { }
ManagedCCFClientUpdateResponse contains the response from method ManagedCCFClient.BeginUpdate.
type ManagedCCFList ¶
type ManagedCCFList struct { // The URL the client should use to fetch the next page (per server side paging). NextLink *string // List of Managed CCF Value []*ManagedCCF }
ManagedCCFList - Object that includes an array of Managed CCF and a possible link for next set.
func (ManagedCCFList) MarshalJSON ¶
func (m ManagedCCFList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedCCFList.
func (*ManagedCCFList) UnmarshalJSON ¶
func (m *ManagedCCFList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCCFList.
type ManagedCCFProperties ¶
type ManagedCCFProperties struct { // Deployment Type of Managed CCF DeploymentType *DeploymentType // List of member identity certificates for Managed CCF MemberIdentityCertificates []*MemberIdentityCertificate // Number of CCF nodes in the Managed CCF. NodeCount *int32 // READ-ONLY; Unique name for the Managed CCF. AppName *string // READ-ONLY; Endpoint for calling Managed CCF Service. AppURI *string // READ-ONLY; Endpoint for accessing network identity. IdentityServiceURI *string // READ-ONLY; Provisioning state of Ledger Resource ProvisioningState *ProvisioningState }
ManagedCCFProperties - Additional Managed CCF properties.
func (ManagedCCFProperties) MarshalJSON ¶
func (m ManagedCCFProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedCCFProperties.
func (*ManagedCCFProperties) UnmarshalJSON ¶
func (m *ManagedCCFProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCCFProperties.
type MemberIdentityCertificate ¶
type MemberIdentityCertificate struct { // Member Identity Certificate Certificate *string // Member Identity Certificate Encryption Key Encryptionkey *string // Anything Tags any }
MemberIdentityCertificate - Object representing MemberIdentityCertificate for Managed CCF.
func (MemberIdentityCertificate) MarshalJSON ¶
func (m MemberIdentityCertificate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MemberIdentityCertificate.
func (*MemberIdentityCertificate) UnmarshalJSON ¶
func (m *MemberIdentityCertificate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MemberIdentityCertificate.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶ added in v0.4.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Retrieves a list of available API operations
Generated from API version 2023-01-26-preview
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7e295a19c5382a4df2f8101e545fed34186d83bf/specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/Operations_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confidentialledger/armconfidentialledger" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armconfidentialledger.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewOperationsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ResourceProviderOperationList = armconfidentialledger.ResourceProviderOperationList{ // Value: []*armconfidentialledger.ResourceProviderOperationDefinition{ // { // Name: to.Ptr("Microsoft.ConfidentialLedger/ledgers/read"), // Display: &armconfidentialledger.ResourceProviderOperationDisplay{ // Description: to.Ptr("View the properties of a Confidential Ledger"), // Operation: to.Ptr("Get Confidential Ledger properties"), // Resource: to.Ptr("ledger"), // }, // IsDataAction: to.Ptr(false), // }}, // } } }
Output:
type OperationsClientListOptions ¶ added in v0.2.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶ added in v0.2.0
type OperationsClientListResponse struct {
ResourceProviderOperationList
}
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - Object representing ProvisioningState for Confidential Ledger.
const ( ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" ProvisioningStateUnknown ProvisioningState = "Unknown" ProvisioningStateUpdating ProvisioningState = "Updating" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type ResourceProviderOperationDefinition ¶
type ResourceProviderOperationDefinition struct { // Details about the operations Display *ResourceProviderOperationDisplay // Indicates whether the operation is data action or not. IsDataAction *bool // Resource provider operation name. Name *string }
ResourceProviderOperationDefinition - Describes the Resource Provider Operation.
func (ResourceProviderOperationDefinition) MarshalJSON ¶ added in v1.1.0
func (r ResourceProviderOperationDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceProviderOperationDefinition.
func (*ResourceProviderOperationDefinition) UnmarshalJSON ¶ added in v1.1.0
func (r *ResourceProviderOperationDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderOperationDefinition.
type ResourceProviderOperationDisplay ¶
type ResourceProviderOperationDisplay struct { // Description of the resource provider operation. Description *string // Name of the resource provider operation. Operation *string // Name of the resource provider. Provider *string // Name of the resource type. Resource *string }
ResourceProviderOperationDisplay - Describes the properties of the Operation.
func (ResourceProviderOperationDisplay) MarshalJSON ¶ added in v1.1.0
func (r ResourceProviderOperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceProviderOperationDisplay.
func (*ResourceProviderOperationDisplay) UnmarshalJSON ¶ added in v1.1.0
func (r *ResourceProviderOperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderOperationDisplay.
type ResourceProviderOperationList ¶
type ResourceProviderOperationList struct { // READ-ONLY; The URI that can be used to request the next page for list of Azure operations. NextLink *string // READ-ONLY; Resource provider operations list. Value []*ResourceProviderOperationDefinition }
ResourceProviderOperationList - List containing this Resource Provider's available operations.
func (ResourceProviderOperationList) MarshalJSON ¶
func (r ResourceProviderOperationList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceProviderOperationList.
func (*ResourceProviderOperationList) UnmarshalJSON ¶ added in v1.1.0
func (r *ResourceProviderOperationList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderOperationList.
type RunningState ¶
type RunningState string
RunningState - Object representing RunningState for Confidential Ledger.
const ( RunningStateActive RunningState = "Active" RunningStatePaused RunningState = "Paused" RunningStatePausing RunningState = "Pausing" RunningStateResuming RunningState = "Resuming" RunningStateUnknown RunningState = "Unknown" )
func PossibleRunningStateValues ¶
func PossibleRunningStateValues() []RunningState
PossibleRunningStateValues returns the possible values for the RunningState const type.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.