Documentation
¶
Index ¶
- type ClientFactory
- type CreateEventstreamRequest
- type Definition
- type DefinitionPart
- type DefinitionResponse
- type Eventstream
- type Eventstreams
- type ItemType
- type ItemsClient
- func (client *ItemsClient) BeginCreateEventstream(ctx context.Context, workspaceID string, ...) (*runtime.Poller[ItemsClientCreateEventstreamResponse], error)
- func (client *ItemsClient) BeginGetEventstreamDefinition(ctx context.Context, workspaceID string, eventstreamID string, ...) (*runtime.Poller[ItemsClientGetEventstreamDefinitionResponse], error)
- func (client *ItemsClient) BeginUpdateEventstreamDefinition(ctx context.Context, workspaceID string, eventstreamID string, ...) (*runtime.Poller[ItemsClientUpdateEventstreamDefinitionResponse], error)
- func (client *ItemsClient) CreateEventstream(ctx context.Context, workspaceID string, ...) (ItemsClientCreateEventstreamResponse, error)
- func (client *ItemsClient) DeleteEventstream(ctx context.Context, workspaceID string, eventstreamID string, ...) (ItemsClientDeleteEventstreamResponse, error)
- func (client *ItemsClient) GetEventstream(ctx context.Context, workspaceID string, eventstreamID string, ...) (ItemsClientGetEventstreamResponse, error)
- func (client *ItemsClient) GetEventstreamDefinition(ctx context.Context, workspaceID string, eventstreamID string, ...) (ItemsClientGetEventstreamDefinitionResponse, error)
- func (client *ItemsClient) ListEventstreams(ctx context.Context, workspaceID string, ...) ([]Eventstream, error)
- func (client *ItemsClient) NewListEventstreamsPager(workspaceID string, options *ItemsClientListEventstreamsOptions) *runtime.Pager[ItemsClientListEventstreamsResponse]
- func (client *ItemsClient) UpdateEventstream(ctx context.Context, workspaceID string, eventstreamID string, ...) (ItemsClientUpdateEventstreamResponse, error)
- func (client *ItemsClient) UpdateEventstreamDefinition(ctx context.Context, workspaceID string, eventstreamID string, ...) (ItemsClientUpdateEventstreamDefinitionResponse, error)
- type ItemsClientBeginCreateEventstreamOptions
- type ItemsClientBeginGetEventstreamDefinitionOptions
- type ItemsClientBeginUpdateEventstreamDefinitionOptions
- type ItemsClientCreateEventstreamResponse
- type ItemsClientDeleteEventstreamOptions
- type ItemsClientDeleteEventstreamResponse
- type ItemsClientGetEventstreamDefinitionResponse
- type ItemsClientGetEventstreamOptions
- type ItemsClientGetEventstreamResponse
- type ItemsClientListEventstreamsOptions
- type ItemsClientListEventstreamsResponse
- type ItemsClientUpdateEventstreamDefinitionResponse
- type ItemsClientUpdateEventstreamOptions
- type ItemsClientUpdateEventstreamResponse
- type PayloadType
- type UpdateEventstreamDefinitionRequest
- type UpdateEventstreamRequest
Examples ¶
- ItemsClient.BeginCreateEventstream (CreateAnEventstreamExample)
- ItemsClient.BeginCreateEventstream (CreateAnEventstreamWithPublicDefinitionExample)
- ItemsClient.BeginGetEventstreamDefinition
- ItemsClient.BeginUpdateEventstreamDefinition
- ItemsClient.DeleteEventstream
- ItemsClient.GetEventstream
- ItemsClient.NewListEventstreamsPager
- ItemsClient.UpdateEventstream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientFactory ¶
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 ¶
func NewClientFactory(credential azcore.TokenCredential, endpoint *string, options *azcore.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.
- credential - used to authorize requests. Usually a credential from azidentity.
- endpoint - pass nil to accept the default values.
- options - pass nil to accept the default values.
func NewClientFactoryWithClient ¶
func NewClientFactoryWithClient(client fabric.Client) *ClientFactory
NewClientFactoryWithClient creates a new instance of ClientFactory with sharable Client. The Client will be propagated to any client created from this factory.
- client - Client created in the containing module: github.com/microsoft/fabric-sdk-go/fabric
func (*ClientFactory) NewItemsClient ¶
func (c *ClientFactory) NewItemsClient() *ItemsClient
NewItemsClient creates a new instance of ItemsClient.
type CreateEventstreamRequest ¶
type CreateEventstreamRequest struct { // REQUIRED; The eventstream display name. The display name must follow naming rules according to item type. DisplayName *string // The eventstream public definition [/rest/api/fabric/articles/item-management/definitions/eventstream-definition]. Definition *Definition // The eventstream description. Maximum length is 256 characters. Description *string }
CreateEventstreamRequest - Create eventstream request payload.
func (CreateEventstreamRequest) MarshalJSON ¶
func (c CreateEventstreamRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CreateEventstreamRequest.
func (*CreateEventstreamRequest) UnmarshalJSON ¶
func (c *CreateEventstreamRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CreateEventstreamRequest.
type Definition ¶
type Definition struct { // REQUIRED; A list of definition parts. Parts []DefinitionPart // The format of the item definition. Format *string }
Definition - Eventstream public definition object.
func (Definition) MarshalJSON ¶
func (d Definition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Definition.
func (*Definition) UnmarshalJSON ¶
func (d *Definition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Definition.
type DefinitionPart ¶
type DefinitionPart struct { // The eventstream part path. Path *string // The eventstream part payload. Payload *string // The payload type. PayloadType *PayloadType }
DefinitionPart - Eventstream definition part object.
func (DefinitionPart) MarshalJSON ¶
func (d DefinitionPart) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DefinitionPart.
func (*DefinitionPart) UnmarshalJSON ¶
func (d *DefinitionPart) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DefinitionPart.
type DefinitionResponse ¶
type DefinitionResponse struct { // READ-ONLY; Eventstream public definition object. Definition *Definition }
DefinitionResponse - Eventstream public definition response.
func (DefinitionResponse) MarshalJSON ¶
func (d DefinitionResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DefinitionResponse.
func (*DefinitionResponse) UnmarshalJSON ¶
func (d *DefinitionResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DefinitionResponse.
type Eventstream ¶
type Eventstream struct { // REQUIRED; The item type. Type *ItemType // The item description. Description *string // The item display name. DisplayName *string // READ-ONLY; The item ID. ID *string // READ-ONLY; The workspace ID. WorkspaceID *string }
Eventstream - An eventstream object.
func (Eventstream) MarshalJSON ¶
func (e Eventstream) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Eventstream.
func (*Eventstream) UnmarshalJSON ¶
func (e *Eventstream) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Eventstream.
type Eventstreams ¶
type Eventstreams struct { // REQUIRED; A list of eventstreams. Value []Eventstream // The token for the next result set batch. If there are no more records, it's removed from the response. ContinuationToken *string // The URI of the next result set batch. If there are no more records, it's removed from the response. ContinuationURI *string }
Eventstreams - A list of eventstreams.
func (Eventstreams) MarshalJSON ¶
func (e Eventstreams) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Eventstreams.
func (*Eventstreams) UnmarshalJSON ¶
func (e *Eventstreams) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Eventstreams.
type ItemType ¶
type ItemType string
ItemType - The type of the item. Additional item types may be added over time.
const ( // ItemTypeDashboard - PowerBI dashboard. ItemTypeDashboard ItemType = "Dashboard" // ItemTypeDataPipeline - A data pipeline. ItemTypeDataPipeline ItemType = "DataPipeline" // ItemTypeDatamart - PowerBI datamart. ItemTypeDatamart ItemType = "Datamart" // ItemTypeEnvironment - An environment. ItemTypeEnvironment ItemType = "Environment" // ItemTypeEventhouse - An eventhouse. ItemTypeEventhouse ItemType = "Eventhouse" // ItemTypeEventstream - An eventstream. ItemTypeEventstream ItemType = "Eventstream" // ItemTypeGraphQLAPI - An API for GraphQL item. ItemTypeGraphQLAPI ItemType = "GraphQLApi" // ItemTypeKQLDashboard - A KQL dashboard. ItemTypeKQLDashboard ItemType = "KQLDashboard" // ItemTypeKQLDatabase - A KQL database. ItemTypeKQLDatabase ItemType = "KQLDatabase" // ItemTypeKQLQueryset - A KQL queryset. ItemTypeKQLQueryset ItemType = "KQLQueryset" // ItemTypeLakehouse - A lakehouse. ItemTypeLakehouse ItemType = "Lakehouse" // ItemTypeMLExperiment - A machine learning experiment. ItemTypeMLExperiment ItemType = "MLExperiment" // ItemTypeMLModel - A machine learning model. ItemTypeMLModel ItemType = "MLModel" // ItemTypeMirroredDatabase - A mirrored database. ItemTypeMirroredDatabase ItemType = "MirroredDatabase" // ItemTypeMirroredWarehouse - A mirrored warehouse. ItemTypeMirroredWarehouse ItemType = "MirroredWarehouse" // ItemTypeMountedDataFactory - A MountedDataFactory. ItemTypeMountedDataFactory ItemType = "MountedDataFactory" // ItemTypeNotebook - A notebook. ItemTypeNotebook ItemType = "Notebook" // ItemTypePaginatedReport - PowerBI paginated report. ItemTypePaginatedReport ItemType = "PaginatedReport" // ItemTypeReflex - A Reflex. ItemTypeReflex ItemType = "Reflex" // ItemTypeReport - PowerBI report. ItemTypeReport ItemType = "Report" // ItemTypeSQLDatabase - A SQLDatabase. ItemTypeSQLDatabase ItemType = "SQLDatabase" // ItemTypeSQLEndpoint - An SQL endpoint. ItemTypeSQLEndpoint ItemType = "SQLEndpoint" // ItemTypeSemanticModel - PowerBI semantic model. ItemTypeSemanticModel ItemType = "SemanticModel" // ItemTypeSparkJobDefinition - A spark job definition. ItemTypeSparkJobDefinition ItemType = "SparkJobDefinition" // ItemTypeWarehouse - A warehouse. ItemTypeWarehouse ItemType = "Warehouse" )
func PossibleItemTypeValues ¶
func PossibleItemTypeValues() []ItemType
PossibleItemTypeValues returns the possible values for the ItemType const type.
type ItemsClient ¶
type ItemsClient struct {
// contains filtered or unexported fields
}
ItemsClient contains the methods for the Items group. Don't use this type directly, use a constructor function instead.
func (*ItemsClient) BeginCreateEventstream ¶
func (client *ItemsClient) BeginCreateEventstream(ctx context.Context, workspaceID string, createEventstreamRequest CreateEventstreamRequest, options *ItemsClientBeginCreateEventstreamOptions) (*runtime.Poller[ItemsClientCreateEventstreamResponse], error)
BeginCreateEventstream - This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation]. To create eventstream with definition, refer to Eventstream definition [/rest/api/fabric/articles/item-management/definitions/eventstream-definition]. PERMISSIONS THE CALLER MUST HAVE CONTRIBUTOR OR HIGHER WORKSPACE ROLE. REQUIRED DELEGATED SCOPES Eventstream.ReadWrite.All or Item.ReadWrite.All LIMITATIONS * To create an eventstream the workspace must be on a supported Fabric capacity. For more information see: Microsoft Fabric license types [/fabric/enterprise/licenses#microsoft-fabric-license-types]. MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE If the operation fails it returns an *core.ResponseError type.
Generated from API version v1
- workspaceID - The workspace ID.
- createEventstreamRequest - Create item request payload.
- options - ItemsClientBeginCreateEventstreamOptions contains the optional parameters for the ItemsClient.BeginCreateEventstream method.
Example (CreateAnEventstreamExample) ¶
Generated from example definition
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/microsoft/fabric-sdk-go/fabric/eventstream" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := eventstream.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewItemsClient().BeginCreateEventstream(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", eventstream.CreateEventstreamRequest{ Description: to.Ptr("Eventstream_1 description."), DisplayName: to.Ptr("Eventstream_1"), }, 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:
Example (CreateAnEventstreamWithPublicDefinitionExample) ¶
Generated from example definition
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/microsoft/fabric-sdk-go/fabric/eventstream" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := eventstream.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewItemsClient().BeginCreateEventstream(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", eventstream.CreateEventstreamRequest{ Description: to.Ptr("Eventstream_1 description."), Definition: &eventstream.Definition{ Format: to.Ptr("eventstream"), Parts: []eventstream.DefinitionPart{ { Path: to.Ptr("eventstream.json"), Payload: to.Ptr("SSdkIGxpa2UgdG8gdGVsbCBh..IGpva2UgZm9yIHlvdS4K"), PayloadType: to.Ptr(eventstream.PayloadTypeInlineBase64), }, { Path: to.Ptr(".platform"), Payload: to.Ptr("ZG90UGxhdGZvcm1CYXNlNjRTdHJpbmc="), PayloadType: to.Ptr(eventstream.PayloadTypeInlineBase64), }}, }, DisplayName: to.Ptr("Eventstream_1"), }, 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 (*ItemsClient) BeginGetEventstreamDefinition ¶
func (client *ItemsClient) BeginGetEventstreamDefinition(ctx context.Context, workspaceID string, eventstreamID string, options *ItemsClientBeginGetEventstreamDefinitionOptions) (*runtime.Poller[ItemsClientGetEventstreamDefinitionResponse], error)
BeginGetEventstreamDefinition - This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation]. When you get an eventstream public definition, the sensitivity label is not a part of the definition. PERMISSIONS The caller must have contributor or higher workspace role. REQUIRED DELEGATED SCOPES Eventstream.ReadWrite.All or Item.ReadWrite.All LIMITATIONS This API is blocked for an eventstream with an encrypted sensitivity label. MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE If the operation fails it returns an *core.ResponseError type.
Generated from API version v1
- workspaceID - The workspace ID.
- eventstreamID - The eventstream ID.
- options - ItemsClientBeginGetEventstreamDefinitionOptions contains the optional parameters for the ItemsClient.BeginGetEventstreamDefinition method.
Example ¶
Generated from example definition
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/microsoft/fabric-sdk-go/fabric/eventstream" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := eventstream.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewItemsClient().BeginGetEventstreamDefinition(ctx, "6e335e92-a2a2-4b5a-970a-bd6a89fbb765", "cfafbeb1-8037-4d0c-896e-a46fb27ff229", &eventstream.ItemsClientBeginGetEventstreamDefinitionOptions{Format: 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.DefinitionResponse = eventstream.DefinitionResponse{ // Definition: &eventstream.Definition{ // Parts: []eventstream.DefinitionPart{ // { // Path: to.Ptr("eventstream.json"), // Payload: to.Ptr("SSdkIGxpa2UgdG8gdGVsbCBh..IGpva2UgZm9yIHlvdS4K"), // PayloadType: to.Ptr(eventstream.PayloadTypeInlineBase64), // }, // { // Path: to.Ptr(".platform"), // Payload: to.Ptr("ZG90UGxhdGZvcm1CYXNlNjRTdHJpbmc="), // PayloadType: to.Ptr(eventstream.PayloadTypeInlineBase64), // }}, // }, // } }
Output:
func (*ItemsClient) BeginUpdateEventstreamDefinition ¶
func (client *ItemsClient) BeginUpdateEventstreamDefinition(ctx context.Context, workspaceID string, eventstreamID string, updateEventstreamDefinitionRequest UpdateEventstreamDefinitionRequest, options *ItemsClientBeginUpdateEventstreamDefinitionOptions) (*runtime.Poller[ItemsClientUpdateEventstreamDefinitionResponse], error)
BeginUpdateEventstreamDefinition - This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation]. Updating the eventstream definition, does not affect its sensitivity label. PERMISSIONS The API caller must have contributor or higher workspace role. REQUIRED DELEGATED SCOPES Eventstream.ReadWrite.All or Item.ReadWrite.All MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE If the operation fails it returns an *core.ResponseError type.
Generated from API version v1
- workspaceID - The workspace ID.
- eventstreamID - The eventstream ID.
- updateEventstreamDefinitionRequest - Update eventstream definition request payload.
- options - ItemsClientBeginUpdateEventstreamDefinitionOptions contains the optional parameters for the ItemsClient.BeginUpdateEventstreamDefinition method.
Example ¶
Generated from example definition
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/microsoft/fabric-sdk-go/fabric/eventstream" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := eventstream.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewItemsClient().BeginUpdateEventstreamDefinition(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", "5b218778-e7a5-4d73-8187-f10824047715", eventstream.UpdateEventstreamDefinitionRequest{ Definition: &eventstream.Definition{ Parts: []eventstream.DefinitionPart{ { Path: to.Ptr("eventstream.json"), Payload: to.Ptr("SSdkIGxpa2UgdG8gdGVsbCBh..IGpva2UgZm9yIHlvdS4K"), PayloadType: to.Ptr(eventstream.PayloadTypeInlineBase64), }, { Path: to.Ptr(".platform"), Payload: to.Ptr("ZG90UGxhdGZvcm1CYXNlNjRTdHJpbmc="), PayloadType: to.Ptr(eventstream.PayloadTypeInlineBase64), }}, }, }, &eventstream.ItemsClientBeginUpdateEventstreamDefinitionOptions{UpdateMetadata: to.Ptr(true)}) 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 (*ItemsClient) CreateEventstream ¶
func (client *ItemsClient) CreateEventstream(ctx context.Context, workspaceID string, createEventstreamRequest CreateEventstreamRequest, options *ItemsClientBeginCreateEventstreamOptions) (ItemsClientCreateEventstreamResponse, error)
CreateEventstream - returns ItemsClientCreateEventstreamResponse in sync mode. This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation].
To create eventstream with definition, refer to Eventstream definition [/rest/api/fabric/articles/item-management/definitions/eventstream-definition].
PERMISSIONS THE CALLER MUST HAVE CONTRIBUTOR OR HIGHER WORKSPACE ROLE. REQUIRED DELEGATED SCOPES Eventstream.ReadWrite.All or Item.ReadWrite.All
LIMITATIONS
- To create an eventstream the workspace must be on a supported Fabric capacity. For more information see: Microsoft Fabric license types [/fabric/enterprise/licenses#microsoft-fabric-license-types].
MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section.
| Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes |
INTERFACE Generated from API version v1
- workspaceID - The workspace ID.
- createEventstreamRequest - Create item request payload.
- options - ItemsClientBeginCreateEventstreamOptions contains the optional parameters for the ItemsClient.BeginCreateEventstream method.
func (*ItemsClient) DeleteEventstream ¶
func (client *ItemsClient) DeleteEventstream(ctx context.Context, workspaceID string, eventstreamID string, options *ItemsClientDeleteEventstreamOptions) (ItemsClientDeleteEventstreamResponse, error)
DeleteEventstream - PERMISSIONS The caller must have contributor or higher workspace role. REQUIRED DELEGATED SCOPES Eventstream.ReadWrite.All or Item.ReadWrite.All MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE If the operation fails it returns an *core.ResponseError type.
Generated from API version v1
- workspaceID - The workspace ID.
- eventstreamID - The eventstream ID.
- options - ItemsClientDeleteEventstreamOptions contains the optional parameters for the ItemsClient.DeleteEventstream method.
Example ¶
Generated from example definition
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/microsoft/fabric-sdk-go/fabric/eventstream" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := eventstream.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewItemsClient().DeleteEventstream(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", "5b218778-e7a5-4d73-8187-f10824047715", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ItemsClient) GetEventstream ¶
func (client *ItemsClient) GetEventstream(ctx context.Context, workspaceID string, eventstreamID string, options *ItemsClientGetEventstreamOptions) (ItemsClientGetEventstreamResponse, error)
GetEventstream - PERMISSIONS The caller must have viewer or higher workspace role. REQUIRED DELEGATED SCOPES Eventstream.Read.All or Eventstream.ReadWrite.All or Item.Read.All or Item.ReadWrite.All MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE If the operation fails it returns an *core.ResponseError type.
Generated from API version v1
- workspaceID - The workspace ID.
- eventstreamID - The eventstream ID.
- options - ItemsClientGetEventstreamOptions contains the optional parameters for the ItemsClient.GetEventstream method.
Example ¶
Generated from example definition
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/microsoft/fabric-sdk-go/fabric/eventstream" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := eventstream.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewItemsClient().GetEventstream(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", "5b218778-e7a5-4d73-8187-f10824047715", 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.Eventstream = eventstream.Eventstream{ // Type: to.Ptr(eventstream.ItemTypeEventstream), // Description: to.Ptr("An eventstream description."), // DisplayName: to.Ptr("Eventstream_1"), // ID: to.Ptr("5b218778-e7a5-4d73-8187-f10824047715"), // WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff229"), // } }
Output:
func (*ItemsClient) GetEventstreamDefinition ¶
func (client *ItemsClient) GetEventstreamDefinition(ctx context.Context, workspaceID string, eventstreamID string, options *ItemsClientBeginGetEventstreamDefinitionOptions) (ItemsClientGetEventstreamDefinitionResponse, error)
GetEventstreamDefinition - returns ItemsClientGetEventstreamDefinitionResponse in sync mode. This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation].
When you get an eventstream public definition, the sensitivity label is not a part of the definition.
PERMISSIONS The caller must have contributor or higher workspace role.
REQUIRED DELEGATED SCOPES Eventstream.ReadWrite.All or Item.ReadWrite.All ¶
LIMITATIONS This API is blocked for an eventstream with an encrypted sensitivity label.
MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section.
| Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes |
INTERFACE Generated from API version v1
- workspaceID - The workspace ID.
- eventstreamID - The eventstream ID.
- options - ItemsClientBeginGetEventstreamDefinitionOptions contains the optional parameters for the ItemsClient.BeginGetEventstreamDefinition method.
func (*ItemsClient) ListEventstreams ¶
func (client *ItemsClient) ListEventstreams(ctx context.Context, workspaceID string, options *ItemsClientListEventstreamsOptions) ([]Eventstream, error)
ListEventstreams - returns array of Eventstream from all pages. This API supports pagination [/rest/api/fabric/articles/pagination].
PERMISSIONS The caller must have viewer or higher workspace role.
REQUIRED DELEGATED SCOPES Workspace.Read.All or Workspace.ReadWrite.All ¶
MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section.
| Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes |
INTERFACE Generated from API version v1
- workspaceID - The workspace ID.
- options - ItemsClientListEventstreamsOptions contains the optional parameters for the ItemsClient.NewListEventstreamsPager method.
func (*ItemsClient) NewListEventstreamsPager ¶
func (client *ItemsClient) NewListEventstreamsPager(workspaceID string, options *ItemsClientListEventstreamsOptions) *runtime.Pager[ItemsClientListEventstreamsResponse]
NewListEventstreamsPager - This API supports pagination [/rest/api/fabric/articles/pagination]. PERMISSIONS The caller must have viewer or higher workspace role. REQUIRED DELEGATED SCOPES Workspace.Read.All or Workspace.ReadWrite.All MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE
Generated from API version v1
- workspaceID - The workspace ID.
- options - ItemsClientListEventstreamsOptions contains the optional parameters for the ItemsClient.NewListEventstreamsPager method.
Example ¶
Generated from example definition
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/microsoft/fabric-sdk-go/fabric/eventstream" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := eventstream.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewItemsClient().NewListEventstreamsPager("cfafbeb1-8037-4d0c-896e-a46fb27ff229", &eventstream.ItemsClientListEventstreamsOptions{ContinuationToken: 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.Eventstreams = eventstream.Eventstreams{ // Value: []eventstream.Eventstream{ // { // Type: to.Ptr(eventstream.ItemTypeEventstream), // Description: to.Ptr("An eventstream description."), // DisplayName: to.Ptr("Eventstream_1"), // ID: to.Ptr("3546052c-ae64-4526-b1a8-52af7761426f"), // WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff229"), // }, // { // Type: to.Ptr(eventstream.ItemTypeEventstream), // Description: to.Ptr("An eventstream description."), // DisplayName: to.Ptr("Eventstream_2"), // ID: to.Ptr("dc307e72-3e89-4425-97c3-a364d86dddfa"), // WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff229"), // }, // { // Type: to.Ptr(eventstream.ItemTypeEventstream), // Description: to.Ptr("An eventstream description."), // DisplayName: to.Ptr("Eventstream_3"), // ID: to.Ptr("b48a1f80-862a-4b97-b672-7217bf064dc0"), // WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff229"), // }}, // } } }
Output:
func (*ItemsClient) UpdateEventstream ¶
func (client *ItemsClient) UpdateEventstream(ctx context.Context, workspaceID string, eventstreamID string, updateEventstreamRequest UpdateEventstreamRequest, options *ItemsClientUpdateEventstreamOptions) (ItemsClientUpdateEventstreamResponse, error)
UpdateEventstream - PERMISSIONS The caller must have contributor or higher workspace role. REQUIRED DELEGATED SCOPES Eventstream.ReadWrite.All or Item.ReadWrite.All MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE If the operation fails it returns an *core.ResponseError type.
Generated from API version v1
- workspaceID - The workspace ID.
- eventstreamID - The eventstream ID.
- updateEventstreamRequest - Update eventstream request payload.
- options - ItemsClientUpdateEventstreamOptions contains the optional parameters for the ItemsClient.UpdateEventstream method.
Example ¶
Generated from example definition
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/microsoft/fabric-sdk-go/fabric/eventstream" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := eventstream.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewItemsClient().UpdateEventstream(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", "5b218778-e7a5-4d73-8187-f10824047715", eventstream.UpdateEventstreamRequest{ Description: to.Ptr("A new description for eventstream."), DisplayName: to.Ptr("Eventstream_New_Name"), }, 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.Eventstream = eventstream.Eventstream{ // Type: to.Ptr(eventstream.ItemTypeEventstream), // Description: to.Ptr("A new description for eventstream."), // DisplayName: to.Ptr("Eventstream_New_Name"), // ID: to.Ptr("5b218778-e7a5-4d73-8187-f10824047715"), // WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff229"), // } }
Output:
func (*ItemsClient) UpdateEventstreamDefinition ¶
func (client *ItemsClient) UpdateEventstreamDefinition(ctx context.Context, workspaceID string, eventstreamID string, updateEventstreamDefinitionRequest UpdateEventstreamDefinitionRequest, options *ItemsClientBeginUpdateEventstreamDefinitionOptions) (ItemsClientUpdateEventstreamDefinitionResponse, error)
UpdateEventstreamDefinition - returns ItemsClientUpdateEventstreamDefinitionResponse in sync mode. This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation].
Updating the eventstream definition, does not affect its sensitivity label.
PERMISSIONS The API caller must have contributor or higher workspace role.
REQUIRED DELEGATED SCOPES Eventstream.ReadWrite.All or Item.ReadWrite.All ¶
MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section.
| Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes |
INTERFACE Generated from API version v1
- workspaceID - The workspace ID.
- eventstreamID - The eventstream ID.
- updateEventstreamDefinitionRequest - Update eventstream definition request payload.
- options - ItemsClientBeginUpdateEventstreamDefinitionOptions contains the optional parameters for the ItemsClient.BeginUpdateEventstreamDefinition method.
type ItemsClientBeginCreateEventstreamOptions ¶
type ItemsClientBeginCreateEventstreamOptions struct { // Resumes the long-running operation from the provided token. ResumeToken string }
ItemsClientBeginCreateEventstreamOptions contains the optional parameters for the ItemsClient.BeginCreateEventstream method.
type ItemsClientBeginGetEventstreamDefinitionOptions ¶
type ItemsClientBeginGetEventstreamDefinitionOptions struct { // The format of the eventstream public definition. Format *string // Resumes the long-running operation from the provided token. ResumeToken string }
ItemsClientBeginGetEventstreamDefinitionOptions contains the optional parameters for the ItemsClient.BeginGetEventstreamDefinition method.
type ItemsClientBeginUpdateEventstreamDefinitionOptions ¶
type ItemsClientBeginUpdateEventstreamDefinitionOptions struct { // Resumes the long-running operation from the provided token. ResumeToken string // Whether to update the item's metadata if it is provided in the .platform file. True - Update the metadata if it is provided // in the .platform file as part of the definition, False - Do not update the // metadata. UpdateMetadata *bool }
ItemsClientBeginUpdateEventstreamDefinitionOptions contains the optional parameters for the ItemsClient.BeginUpdateEventstreamDefinition method.
type ItemsClientCreateEventstreamResponse ¶
type ItemsClientCreateEventstreamResponse struct { // An eventstream object. Eventstream }
ItemsClientCreateEventstreamResponse contains the response from method ItemsClient.BeginCreateEventstream.
type ItemsClientDeleteEventstreamOptions ¶
type ItemsClientDeleteEventstreamOptions struct { }
ItemsClientDeleteEventstreamOptions contains the optional parameters for the ItemsClient.DeleteEventstream method.
type ItemsClientDeleteEventstreamResponse ¶
type ItemsClientDeleteEventstreamResponse struct { }
ItemsClientDeleteEventstreamResponse contains the response from method ItemsClient.DeleteEventstream.
type ItemsClientGetEventstreamDefinitionResponse ¶
type ItemsClientGetEventstreamDefinitionResponse struct { // Eventstream public definition response. DefinitionResponse }
ItemsClientGetEventstreamDefinitionResponse contains the response from method ItemsClient.BeginGetEventstreamDefinition.
type ItemsClientGetEventstreamOptions ¶
type ItemsClientGetEventstreamOptions struct { }
ItemsClientGetEventstreamOptions contains the optional parameters for the ItemsClient.GetEventstream method.
type ItemsClientGetEventstreamResponse ¶
type ItemsClientGetEventstreamResponse struct { // An eventstream object. Eventstream }
ItemsClientGetEventstreamResponse contains the response from method ItemsClient.GetEventstream.
type ItemsClientListEventstreamsOptions ¶
type ItemsClientListEventstreamsOptions struct { // A token for retrieving the next page of results. ContinuationToken *string }
ItemsClientListEventstreamsOptions contains the optional parameters for the ItemsClient.NewListEventstreamsPager method.
type ItemsClientListEventstreamsResponse ¶
type ItemsClientListEventstreamsResponse struct { // A list of eventstreams. Eventstreams }
ItemsClientListEventstreamsResponse contains the response from method ItemsClient.NewListEventstreamsPager.
type ItemsClientUpdateEventstreamDefinitionResponse ¶
type ItemsClientUpdateEventstreamDefinitionResponse struct { }
ItemsClientUpdateEventstreamDefinitionResponse contains the response from method ItemsClient.BeginUpdateEventstreamDefinition.
type ItemsClientUpdateEventstreamOptions ¶
type ItemsClientUpdateEventstreamOptions struct { }
ItemsClientUpdateEventstreamOptions contains the optional parameters for the ItemsClient.UpdateEventstream method.
type ItemsClientUpdateEventstreamResponse ¶
type ItemsClientUpdateEventstreamResponse struct { // An eventstream object. Eventstream }
ItemsClientUpdateEventstreamResponse contains the response from method ItemsClient.UpdateEventstream.
type PayloadType ¶
type PayloadType string
PayloadType - The type of the definition part payload. Additional payload types may be added over time.
const ( // PayloadTypeInlineBase64 - Inline Base 64. PayloadTypeInlineBase64 PayloadType = "InlineBase64" )
func PossiblePayloadTypeValues ¶
func PossiblePayloadTypeValues() []PayloadType
PossiblePayloadTypeValues returns the possible values for the PayloadType const type.
type UpdateEventstreamDefinitionRequest ¶
type UpdateEventstreamDefinitionRequest struct { // REQUIRED; Eventstream public definition object. Definition *Definition }
UpdateEventstreamDefinitionRequest - Update eventstream public definition request payload.
func (UpdateEventstreamDefinitionRequest) MarshalJSON ¶
func (u UpdateEventstreamDefinitionRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateEventstreamDefinitionRequest.
func (*UpdateEventstreamDefinitionRequest) UnmarshalJSON ¶
func (u *UpdateEventstreamDefinitionRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateEventstreamDefinitionRequest.
type UpdateEventstreamRequest ¶
type UpdateEventstreamRequest struct { // The eventstream description. Maximum length is 256 characters. Description *string // The eventstream display name. The display name must follow naming rules according to item type. DisplayName *string }
UpdateEventstreamRequest - Update eventstream request.
func (UpdateEventstreamRequest) MarshalJSON ¶
func (u UpdateEventstreamRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateEventstreamRequest.
func (*UpdateEventstreamRequest) UnmarshalJSON ¶
func (u *UpdateEventstreamRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateEventstreamRequest.