Documentation ¶
Index ¶
- type AuthorizationProfile
- type Client
- func (client *Client) Get(ctx context.Context, resourceProviderNamespace string, featureName string, ...) (ClientGetResponse, error)
- func (client *Client) NewListAllPager(options *ClientListAllOptions) *runtime.Pager[ClientListAllResponse]
- func (client *Client) NewListPager(resourceProviderNamespace string, options *ClientListOptions) *runtime.Pager[ClientListResponse]
- func (client *Client) Register(ctx context.Context, resourceProviderNamespace string, featureName string, ...) (ClientRegisterResponse, error)
- func (client *Client) Unregister(ctx context.Context, resourceProviderNamespace string, featureName string, ...) (ClientUnregisterResponse, error)
- type ClientGetOptions
- type ClientGetResponse
- type ClientListAllOptions
- type ClientListAllResponse
- type ClientListOptions
- type ClientListResponse
- type ClientRegisterOptions
- type ClientRegisterResponse
- type ClientUnregisterOptions
- type ClientUnregisterResponse
- type ErrorDefinition
- type ErrorResponse
- type FeatureClient
- type FeatureClientListOperationsOptions
- type FeatureClientListOperationsResponse
- type FeatureOperationsListResult
- type FeatureProperties
- type FeatureResult
- type Operation
- type OperationDisplay
- type OperationListResult
- type ProxyResource
- type SubscriptionFeatureRegistration
- type SubscriptionFeatureRegistrationApprovalType
- type SubscriptionFeatureRegistrationList
- type SubscriptionFeatureRegistrationProperties
- type SubscriptionFeatureRegistrationState
- type SubscriptionFeatureRegistrationsClient
- func (client *SubscriptionFeatureRegistrationsClient) CreateOrUpdate(ctx context.Context, providerNamespace string, featureName string, ...) (SubscriptionFeatureRegistrationsClientCreateOrUpdateResponse, error)
- func (client *SubscriptionFeatureRegistrationsClient) Delete(ctx context.Context, providerNamespace string, featureName string, ...) (SubscriptionFeatureRegistrationsClientDeleteResponse, error)
- func (client *SubscriptionFeatureRegistrationsClient) Get(ctx context.Context, providerNamespace string, featureName string, ...) (SubscriptionFeatureRegistrationsClientGetResponse, error)
- func (client *SubscriptionFeatureRegistrationsClient) NewListAllBySubscriptionPager(options *SubscriptionFeatureRegistrationsClientListAllBySubscriptionOptions) ...
- func (client *SubscriptionFeatureRegistrationsClient) NewListBySubscriptionPager(providerNamespace string, ...) ...
- type SubscriptionFeatureRegistrationsClientCreateOrUpdateOptions
- type SubscriptionFeatureRegistrationsClientCreateOrUpdateResponse
- type SubscriptionFeatureRegistrationsClientDeleteOptions
- type SubscriptionFeatureRegistrationsClientDeleteResponse
- type SubscriptionFeatureRegistrationsClientGetOptions
- type SubscriptionFeatureRegistrationsClientGetResponse
- type SubscriptionFeatureRegistrationsClientListAllBySubscriptionOptions
- type SubscriptionFeatureRegistrationsClientListAllBySubscriptionResponse
- type SubscriptionFeatureRegistrationsClientListBySubscriptionOptions
- type SubscriptionFeatureRegistrationsClientListBySubscriptionResponse
Examples ¶
- Client.Get
- Client.NewListAllPager
- Client.NewListPager
- Client.Register
- Client.Unregister
- FeatureClient.NewListOperationsPager
- SubscriptionFeatureRegistrationsClient.CreateOrUpdate
- SubscriptionFeatureRegistrationsClient.Delete
- SubscriptionFeatureRegistrationsClient.Get
- SubscriptionFeatureRegistrationsClient.NewListAllBySubscriptionPager
- SubscriptionFeatureRegistrationsClient.NewListBySubscriptionPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizationProfile ¶
type AuthorizationProfile struct { // READ-ONLY; The approved time ApprovedTime *time.Time `json:"approvedTime,omitempty" azure:"ro"` // READ-ONLY; The approver Approver *string `json:"approver,omitempty" azure:"ro"` // READ-ONLY; The requested time RequestedTime *time.Time `json:"requestedTime,omitempty" azure:"ro"` // READ-ONLY; The requester Requester *string `json:"requester,omitempty" azure:"ro"` // READ-ONLY; The requester object id RequesterObjectID *string `json:"requesterObjectId,omitempty" azure:"ro"` }
AuthorizationProfile - Authorization Profile
func (AuthorizationProfile) MarshalJSON ¶
func (a AuthorizationProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AuthorizationProfile.
func (*AuthorizationProfile) UnmarshalJSON ¶
func (a *AuthorizationProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationProfile.
type Client ¶ added in v0.2.0
type Client struct {
// contains filtered or unexported fields
}
Client contains the methods for the Features 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 Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*Client) Get ¶ added in v0.2.0
func (client *Client) Get(ctx context.Context, resourceProviderNamespace string, featureName string, options *ClientGetOptions) (ClientGetResponse, error)
Get - Gets the preview feature with the specified name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 resourceProviderNamespace - The resource provider namespace for the feature. featureName - The name of the feature to get. options - ClientGetOptions contains the optional parameters for the Client.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/getFeature.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armfeatures" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armfeatures.NewClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "Resource Provider Namespace", "feature", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*Client) NewListAllPager ¶ added in v0.4.0
func (client *Client) NewListAllPager(options *ClientListAllOptions) *runtime.Pager[ClientListAllResponse]
NewListAllPager - Gets all the preview features that are available through AFEC for the subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 options - ClientListAllOptions contains the optional parameters for the Client.ListAll method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/listSubscriptionFeatures.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armfeatures" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armfeatures.NewClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListAllPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*Client) NewListPager ¶ added in v0.4.0
func (client *Client) NewListPager(resourceProviderNamespace string, options *ClientListOptions) *runtime.Pager[ClientListResponse]
NewListPager - Gets all the preview features in a provider namespace that are available through AFEC for the subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 resourceProviderNamespace - The namespace of the resource provider for getting features. options - ClientListOptions contains the optional parameters for the Client.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/listProviderFeatures.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armfeatures" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armfeatures.NewClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("Resource Provider Namespace", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*Client) Register ¶ added in v0.2.0
func (client *Client) Register(ctx context.Context, resourceProviderNamespace string, featureName string, options *ClientRegisterOptions) (ClientRegisterResponse, error)
Register - Registers the preview feature for the subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 resourceProviderNamespace - The namespace of the resource provider. featureName - The name of the feature to register. options - ClientRegisterOptions contains the optional parameters for the Client.Register method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/registerFeature.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armfeatures" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armfeatures.NewClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Register(ctx, "Resource Provider Namespace", "feature", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*Client) Unregister ¶ added in v0.2.0
func (client *Client) Unregister(ctx context.Context, resourceProviderNamespace string, featureName string, options *ClientUnregisterOptions) (ClientUnregisterResponse, error)
Unregister - Unregisters the preview feature for the subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 resourceProviderNamespace - The namespace of the resource provider. featureName - The name of the feature to unregister. options - ClientUnregisterOptions contains the optional parameters for the Client.Unregister method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/unregisterFeature.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armfeatures" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armfeatures.NewClient("ff23096b-f5a2-46ea-bd62-59c3e93fef9a", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Unregister(ctx, "Resource Provider Namespace", "feature", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type ClientGetOptions ¶ added in v0.2.0
type ClientGetOptions struct { }
ClientGetOptions contains the optional parameters for the Client.Get method.
type ClientGetResponse ¶ added in v0.2.0
type ClientGetResponse struct {
FeatureResult
}
ClientGetResponse contains the response from method Client.Get.
type ClientListAllOptions ¶ added in v0.2.0
type ClientListAllOptions struct { }
ClientListAllOptions contains the optional parameters for the Client.ListAll method.
type ClientListAllResponse ¶ added in v0.2.0
type ClientListAllResponse struct {
FeatureOperationsListResult
}
ClientListAllResponse contains the response from method Client.ListAll.
type ClientListOptions ¶ added in v0.2.0
type ClientListOptions struct { }
ClientListOptions contains the optional parameters for the Client.List method.
type ClientListResponse ¶ added in v0.2.0
type ClientListResponse struct {
FeatureOperationsListResult
}
ClientListResponse contains the response from method Client.List.
type ClientRegisterOptions ¶ added in v0.2.0
type ClientRegisterOptions struct { }
ClientRegisterOptions contains the optional parameters for the Client.Register method.
type ClientRegisterResponse ¶ added in v0.2.0
type ClientRegisterResponse struct {
FeatureResult
}
ClientRegisterResponse contains the response from method Client.Register.
type ClientUnregisterOptions ¶ added in v0.2.0
type ClientUnregisterOptions struct { }
ClientUnregisterOptions contains the optional parameters for the Client.Unregister method.
type ClientUnregisterResponse ¶ added in v0.2.0
type ClientUnregisterResponse struct {
FeatureResult
}
ClientUnregisterResponse contains the response from method Client.Unregister.
type ErrorDefinition ¶
type ErrorDefinition struct { // Internal error details. Details []*ErrorDefinition `json:"details,omitempty"` // READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code. Code *string `json:"code,omitempty" azure:"ro"` // READ-ONLY; Description of the error. Message *string `json:"message,omitempty" azure:"ro"` }
ErrorDefinition - Error definition.
type ErrorResponse ¶
type ErrorResponse struct { // The error details. Error *ErrorDefinition `json:"error,omitempty"` }
ErrorResponse - Error response indicates that the service is not able to process the incoming request.
type FeatureClient ¶
type FeatureClient struct {
// contains filtered or unexported fields
}
FeatureClient contains the methods for the FeatureClient group. Don't use this type directly, use NewFeatureClient() instead.
func NewFeatureClient ¶
func NewFeatureClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*FeatureClient, error)
NewFeatureClient creates a new instance of FeatureClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*FeatureClient) NewListOperationsPager ¶ added in v0.4.0
func (client *FeatureClient) NewListOperationsPager(options *FeatureClientListOperationsOptions) *runtime.Pager[FeatureClientListOperationsResponse]
NewListOperationsPager - Lists all of the available Microsoft.Features REST API operations. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 options - FeatureClientListOperationsOptions contains the optional parameters for the FeatureClient.ListOperations method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/listFeaturesOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armfeatures" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armfeatures.NewFeatureClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListOperationsPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type FeatureClientListOperationsOptions ¶
type FeatureClientListOperationsOptions struct { }
FeatureClientListOperationsOptions contains the optional parameters for the FeatureClient.ListOperations method.
type FeatureClientListOperationsResponse ¶
type FeatureClientListOperationsResponse struct {
OperationListResult
}
FeatureClientListOperationsResponse contains the response from method FeatureClient.ListOperations.
type FeatureOperationsListResult ¶
type FeatureOperationsListResult struct { // The URL to use for getting the next set of results. NextLink *string `json:"nextLink,omitempty"` // The array of features. Value []*FeatureResult `json:"value,omitempty"` }
FeatureOperationsListResult - List of previewed features.
type FeatureProperties ¶
type FeatureProperties struct { // The registration state of the feature for the subscription. State *string `json:"state,omitempty"` }
FeatureProperties - Information about feature.
type FeatureResult ¶
type FeatureResult struct { // The resource ID of the feature. ID *string `json:"id,omitempty"` // The name of the feature. Name *string `json:"name,omitempty"` // Properties of the previewed feature. Properties *FeatureProperties `json:"properties,omitempty"` // The resource type of the feature. Type *string `json:"type,omitempty"` }
FeatureResult - Previewed feature information.
type Operation ¶
type Operation struct { // The object that represents the operation. Display *OperationDisplay `json:"display,omitempty"` // Operation name: {provider}/{resource}/{operation} Name *string `json:"name,omitempty"` }
Operation - Microsoft.Features operation
type OperationDisplay ¶
type OperationDisplay struct { // Operation type: Read, write, delete, etc. Operation *string `json:"operation,omitempty"` // Service provider: Microsoft.Features Provider *string `json:"provider,omitempty"` // Resource on which the operation is performed: Profile, endpoint, etc. Resource *string `json:"resource,omitempty"` }
OperationDisplay - The object that represents the operation.
type OperationListResult ¶
type OperationListResult struct { // URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` // List of Microsoft.Features operations. Value []*Operation `json:"value,omitempty"` }
OperationListResult - Result of the request to list Microsoft.Features operations. It contains a list of operations and a URL link to get the next set of results.
type ProxyResource ¶
type ProxyResource struct { // READ-ONLY; Azure resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Azure resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ProxyResource - An Azure proxy resource.
type SubscriptionFeatureRegistration ¶
type SubscriptionFeatureRegistration struct { Properties *SubscriptionFeatureRegistrationProperties `json:"properties,omitempty"` // READ-ONLY; Azure resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Azure resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure resource type. Type *string `json:"type,omitempty" azure:"ro"` }
SubscriptionFeatureRegistration - Subscription feature registration details
type SubscriptionFeatureRegistrationApprovalType ¶
type SubscriptionFeatureRegistrationApprovalType string
SubscriptionFeatureRegistrationApprovalType - The feature approval type.
const ( SubscriptionFeatureRegistrationApprovalTypeApprovalRequired SubscriptionFeatureRegistrationApprovalType = "ApprovalRequired" SubscriptionFeatureRegistrationApprovalTypeAutoApproval SubscriptionFeatureRegistrationApprovalType = "AutoApproval" SubscriptionFeatureRegistrationApprovalTypeNotSpecified SubscriptionFeatureRegistrationApprovalType = "NotSpecified" )
func PossibleSubscriptionFeatureRegistrationApprovalTypeValues ¶
func PossibleSubscriptionFeatureRegistrationApprovalTypeValues() []SubscriptionFeatureRegistrationApprovalType
PossibleSubscriptionFeatureRegistrationApprovalTypeValues returns the possible values for the SubscriptionFeatureRegistrationApprovalType const type.
type SubscriptionFeatureRegistrationList ¶
type SubscriptionFeatureRegistrationList struct { // The link used to get the next page of subscription feature registrations list. NextLink *string `json:"nextLink,omitempty"` // The list of subscription feature registrations. Value []*SubscriptionFeatureRegistration `json:"value,omitempty"` }
SubscriptionFeatureRegistrationList - The list of subscription feature registrations.
type SubscriptionFeatureRegistrationProperties ¶
type SubscriptionFeatureRegistrationProperties struct { // Authorization Profile AuthorizationProfile *AuthorizationProfile `json:"authorizationProfile,omitempty"` // The feature description. Description *string `json:"description,omitempty"` // Key-value pairs for meta data. Metadata map[string]*string `json:"metadata,omitempty"` // Indicates whether feature should be displayed in Portal. ShouldFeatureDisplayInPortal *bool `json:"shouldFeatureDisplayInPortal,omitempty"` // The state. State *SubscriptionFeatureRegistrationState `json:"state,omitempty"` // READ-ONLY; The feature approval type. ApprovalType *SubscriptionFeatureRegistrationApprovalType `json:"approvalType,omitempty" azure:"ro"` // READ-ONLY; The featureDisplayName. DisplayName *string `json:"displayName,omitempty" azure:"ro"` // READ-ONLY; The feature documentation link. DocumentationLink *string `json:"documentationLink,omitempty" azure:"ro"` // READ-ONLY; The featureName. FeatureName *string `json:"featureName,omitempty" azure:"ro"` // READ-ONLY; The providerNamespace. ProviderNamespace *string `json:"providerNamespace,omitempty" azure:"ro"` // READ-ONLY; The feature registration date. RegistrationDate *time.Time `json:"registrationDate,omitempty" azure:"ro"` // READ-ONLY; The feature release date. ReleaseDate *time.Time `json:"releaseDate,omitempty" azure:"ro"` // READ-ONLY; The subscriptionId. SubscriptionID *string `json:"subscriptionId,omitempty" azure:"ro"` // READ-ONLY; The tenantId. TenantID *string `json:"tenantId,omitempty" azure:"ro"` }
func (SubscriptionFeatureRegistrationProperties) MarshalJSON ¶
func (s SubscriptionFeatureRegistrationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SubscriptionFeatureRegistrationProperties.
func (*SubscriptionFeatureRegistrationProperties) UnmarshalJSON ¶
func (s *SubscriptionFeatureRegistrationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionFeatureRegistrationProperties.
type SubscriptionFeatureRegistrationState ¶
type SubscriptionFeatureRegistrationState string
SubscriptionFeatureRegistrationState - The state.
const ( SubscriptionFeatureRegistrationStateNotRegistered SubscriptionFeatureRegistrationState = "NotRegistered" SubscriptionFeatureRegistrationStateNotSpecified SubscriptionFeatureRegistrationState = "NotSpecified" SubscriptionFeatureRegistrationStatePending SubscriptionFeatureRegistrationState = "Pending" SubscriptionFeatureRegistrationStateRegistered SubscriptionFeatureRegistrationState = "Registered" SubscriptionFeatureRegistrationStateRegistering SubscriptionFeatureRegistrationState = "Registering" SubscriptionFeatureRegistrationStateUnregistered SubscriptionFeatureRegistrationState = "Unregistered" SubscriptionFeatureRegistrationStateUnregistering SubscriptionFeatureRegistrationState = "Unregistering" )
func PossibleSubscriptionFeatureRegistrationStateValues ¶
func PossibleSubscriptionFeatureRegistrationStateValues() []SubscriptionFeatureRegistrationState
PossibleSubscriptionFeatureRegistrationStateValues returns the possible values for the SubscriptionFeatureRegistrationState const type.
type SubscriptionFeatureRegistrationsClient ¶
type SubscriptionFeatureRegistrationsClient struct {
// contains filtered or unexported fields
}
SubscriptionFeatureRegistrationsClient contains the methods for the SubscriptionFeatureRegistrations group. Don't use this type directly, use NewSubscriptionFeatureRegistrationsClient() instead.
func NewSubscriptionFeatureRegistrationsClient ¶
func NewSubscriptionFeatureRegistrationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubscriptionFeatureRegistrationsClient, error)
NewSubscriptionFeatureRegistrationsClient creates a new instance of SubscriptionFeatureRegistrationsClient with the specified values. subscriptionID - The Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*SubscriptionFeatureRegistrationsClient) CreateOrUpdate ¶
func (client *SubscriptionFeatureRegistrationsClient) CreateOrUpdate(ctx context.Context, providerNamespace string, featureName string, options *SubscriptionFeatureRegistrationsClientCreateOrUpdateOptions) (SubscriptionFeatureRegistrationsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Create or update a feature registration. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 providerNamespace - The provider namespace. featureName - The feature name. options - SubscriptionFeatureRegistrationsClientCreateOrUpdateOptions contains the optional parameters for the SubscriptionFeatureRegistrationsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/SubscriptionFeatureRegistrationPUT.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armfeatures" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armfeatures.NewSubscriptionFeatureRegistrationsClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.CreateOrUpdate(ctx, "subscriptionFeatureRegistrationGroupTestRG", "testFeature", &armfeatures.SubscriptionFeatureRegistrationsClientCreateOrUpdateOptions{SubscriptionFeatureRegistrationType: &armfeatures.SubscriptionFeatureRegistration{ Properties: &armfeatures.SubscriptionFeatureRegistrationProperties{}, }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*SubscriptionFeatureRegistrationsClient) Delete ¶
func (client *SubscriptionFeatureRegistrationsClient) Delete(ctx context.Context, providerNamespace string, featureName string, options *SubscriptionFeatureRegistrationsClientDeleteOptions) (SubscriptionFeatureRegistrationsClientDeleteResponse, error)
Delete - Deletes a feature registration If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 providerNamespace - The provider namespace. featureName - The feature name. options - SubscriptionFeatureRegistrationsClientDeleteOptions contains the optional parameters for the SubscriptionFeatureRegistrationsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/SubscriptionFeatureRegistrationDELETE.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armfeatures" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armfeatures.NewSubscriptionFeatureRegistrationsClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.Delete(ctx, "subscriptionFeatureRegistrationGroupTestRG", "testFeature", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*SubscriptionFeatureRegistrationsClient) Get ¶
func (client *SubscriptionFeatureRegistrationsClient) Get(ctx context.Context, providerNamespace string, featureName string, options *SubscriptionFeatureRegistrationsClientGetOptions) (SubscriptionFeatureRegistrationsClientGetResponse, error)
Get - Returns a feature registration If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 providerNamespace - The provider namespace. featureName - The feature name. options - SubscriptionFeatureRegistrationsClientGetOptions contains the optional parameters for the SubscriptionFeatureRegistrationsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/SubscriptionFeatureRegistrationGET.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armfeatures" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armfeatures.NewSubscriptionFeatureRegistrationsClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "subscriptionFeatureRegistrationGroupTestRG", "testFeature", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*SubscriptionFeatureRegistrationsClient) NewListAllBySubscriptionPager ¶ added in v0.4.0
func (client *SubscriptionFeatureRegistrationsClient) NewListAllBySubscriptionPager(options *SubscriptionFeatureRegistrationsClientListAllBySubscriptionOptions) *runtime.Pager[SubscriptionFeatureRegistrationsClientListAllBySubscriptionResponse]
NewListAllBySubscriptionPager - Returns subscription feature registrations for given subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 options - SubscriptionFeatureRegistrationsClientListAllBySubscriptionOptions contains the optional parameters for the SubscriptionFeatureRegistrationsClient.ListAllBySubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/SubscriptionFeatureRegistrationLISTALL.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armfeatures" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armfeatures.NewSubscriptionFeatureRegistrationsClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListAllBySubscriptionPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*SubscriptionFeatureRegistrationsClient) NewListBySubscriptionPager ¶ added in v0.4.0
func (client *SubscriptionFeatureRegistrationsClient) NewListBySubscriptionPager(providerNamespace string, options *SubscriptionFeatureRegistrationsClientListBySubscriptionOptions) *runtime.Pager[SubscriptionFeatureRegistrationsClientListBySubscriptionResponse]
NewListBySubscriptionPager - Returns subscription feature registrations for given subscription and provider namespace. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-01 providerNamespace - The provider namespace. options - SubscriptionFeatureRegistrationsClientListBySubscriptionOptions contains the optional parameters for the SubscriptionFeatureRegistrationsClient.ListBySubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Features/stable/2021-07-01/examples/FeatureRegistration/SubscriptionFeatureRegistrationLIST.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armfeatures" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armfeatures.NewSubscriptionFeatureRegistrationsClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListBySubscriptionPager("subscriptionFeatureRegistrationGroupTestRG", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type SubscriptionFeatureRegistrationsClientCreateOrUpdateOptions ¶ added in v0.2.0
type SubscriptionFeatureRegistrationsClientCreateOrUpdateOptions struct { // Subscription Feature Registration Type details. SubscriptionFeatureRegistrationType *SubscriptionFeatureRegistration }
SubscriptionFeatureRegistrationsClientCreateOrUpdateOptions contains the optional parameters for the SubscriptionFeatureRegistrationsClient.CreateOrUpdate method.
type SubscriptionFeatureRegistrationsClientCreateOrUpdateResponse ¶ added in v0.2.0
type SubscriptionFeatureRegistrationsClientCreateOrUpdateResponse struct {
SubscriptionFeatureRegistration
}
SubscriptionFeatureRegistrationsClientCreateOrUpdateResponse contains the response from method SubscriptionFeatureRegistrationsClient.CreateOrUpdate.
type SubscriptionFeatureRegistrationsClientDeleteOptions ¶ added in v0.2.0
type SubscriptionFeatureRegistrationsClientDeleteOptions struct { }
SubscriptionFeatureRegistrationsClientDeleteOptions contains the optional parameters for the SubscriptionFeatureRegistrationsClient.Delete method.
type SubscriptionFeatureRegistrationsClientDeleteResponse ¶ added in v0.2.0
type SubscriptionFeatureRegistrationsClientDeleteResponse struct { }
SubscriptionFeatureRegistrationsClientDeleteResponse contains the response from method SubscriptionFeatureRegistrationsClient.Delete.
type SubscriptionFeatureRegistrationsClientGetOptions ¶ added in v0.2.0
type SubscriptionFeatureRegistrationsClientGetOptions struct { }
SubscriptionFeatureRegistrationsClientGetOptions contains the optional parameters for the SubscriptionFeatureRegistrationsClient.Get method.
type SubscriptionFeatureRegistrationsClientGetResponse ¶ added in v0.2.0
type SubscriptionFeatureRegistrationsClientGetResponse struct {
SubscriptionFeatureRegistration
}
SubscriptionFeatureRegistrationsClientGetResponse contains the response from method SubscriptionFeatureRegistrationsClient.Get.
type SubscriptionFeatureRegistrationsClientListAllBySubscriptionOptions ¶ added in v0.2.0
type SubscriptionFeatureRegistrationsClientListAllBySubscriptionOptions struct { }
SubscriptionFeatureRegistrationsClientListAllBySubscriptionOptions contains the optional parameters for the SubscriptionFeatureRegistrationsClient.ListAllBySubscription method.
type SubscriptionFeatureRegistrationsClientListAllBySubscriptionResponse ¶ added in v0.2.0
type SubscriptionFeatureRegistrationsClientListAllBySubscriptionResponse struct {
SubscriptionFeatureRegistrationList
}
SubscriptionFeatureRegistrationsClientListAllBySubscriptionResponse contains the response from method SubscriptionFeatureRegistrationsClient.ListAllBySubscription.
type SubscriptionFeatureRegistrationsClientListBySubscriptionOptions ¶ added in v0.2.0
type SubscriptionFeatureRegistrationsClientListBySubscriptionOptions struct { }
SubscriptionFeatureRegistrationsClientListBySubscriptionOptions contains the optional parameters for the SubscriptionFeatureRegistrationsClient.ListBySubscription method.
type SubscriptionFeatureRegistrationsClientListBySubscriptionResponse ¶ added in v0.2.0
type SubscriptionFeatureRegistrationsClientListBySubscriptionResponse struct {
SubscriptionFeatureRegistrationList
}
SubscriptionFeatureRegistrationsClientListBySubscriptionResponse contains the response from method SubscriptionFeatureRegistrationsClient.ListBySubscription.