func NewNetworkSecurityRule(ctx *pulumi.Context,
	name string, args *NetworkSecurityRuleArgs, opts ...pulumi.ResourceOption) (*NetworkSecurityRule, error) {
	if args == nil {
		return nil, errors.New("missing one or more required arguments")
	}

	if args.Access == nil {
		return nil, errors.New("invalid value for required argument 'Access'")
	}
	if args.Direction == nil {
		return nil, errors.New("invalid value for required argument 'Direction'")
	}
	if args.NetworkSecurityGroupName == nil {
		return nil, errors.New("invalid value for required argument 'NetworkSecurityGroupName'")
	}
	if args.Priority == nil {
		return nil, errors.New("invalid value for required argument 'Priority'")
	}
	if args.Protocol == nil {
		return nil, errors.New("invalid value for required argument 'Protocol'")
	}
	if args.ResourceGroupName == nil {
		return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
	}
	var resource NetworkSecurityRule
	err := ctx.RegisterResource("azure:network/networkSecurityRule:NetworkSecurityRule", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}
// NewNetworkSecurityRule registers a new resource with the given unique name, arguments, and options.
NewNetworkSecurityRule registers a new resource with the given unique name, arguments, and options.
// NewNetworkSecurityRule registers a new resource with the given unique name arguments and options .
func NewNetworkSecurityRule(ctx *pulumi.Context,
	name string, args *NetworkSecurityRuleArgs, opts ...pulumi.ResourceOption) (*NetworkSecurityRule, error) {
	if args == nil {
		return nil, errors.New("missing one or more required arguments")
	}
	if args.Access == nil {
		return nil, errors.New("invalid value for required argument 'Access'")
	}
	if args.Direction == nil {
		return nil, errors.New("invalid value for required argument 'Direction'")
	}
	if args.NetworkSecurityGroupName == nil {
		return nil, errors.New("invalid value for required argument 'NetworkSecurityGroupName'")
	}
	if args.Priority == nil {
		return nil, errors.New("invalid value for required argument 'Priority'")
	}
	if args.Protocol == nil {
		return nil, errors.New("invalid value for required argument 'Protocol'")
	}
	if args.ResourceGroupName == nil {
		return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
	}
	var resource NetworkSecurityRule
	err := ctx.RegisterResource("azure:network/networkSecurityRule:NetworkSecurityRule", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}
func NewNetworkSecurityRule ( ctx * pulumi . Context , name string , args * NetworkSecurityRuleArgs , opts ... pulumi . ResourceOption ) ( * NetworkSecurityRule , error ) { if args == nil { return nil , errors . New ( " " ) } if args . Access == nil { return nil , errors . New ( " " ) } if args . Direction == nil { return nil , errors . New ( " " ) } if args . NetworkSecurityGroupName == nil { return nil , errors . New ( " " ) } if args . Priority == nil { return nil , errors . New ( " " ) } if args . Protocol == nil { return nil , errors . New ( " " ) } if args . ResourceGroupName == nil { return nil , errors . New ( " " ) } var resource NetworkSecurityRule err := ctx . RegisterResource ( " " , name , args , & resource , opts ... ) if err != nil { return nil , err } return & resource , nil }
NewNetworkSecurityRule registers a new resource with the given unique name, arguments, and options.
NewNetworkSecurityRule registers a new resource with the given unique name arguments and options .